Predicator.Errors.UndefinedVariableError (predicator v2.2.0)

View Source

Error struct for undefined variable errors in Predicator evaluation.

This error occurs when trying to access a variable that doesn't exist in the evaluation context.

Fields

  • message - Human-readable error description
  • variable - The name of the undefined variable

Examples

%Predicator.Errors.UndefinedVariableError{
  message: "Undefined variable: score",
  variable: "score"
}

%Predicator.Errors.UndefinedVariableError{
  message: "Undefined variable: user.profile.settings",
  variable: "user.profile.settings"
}

Summary

Functions

Creates an undefined variable error.

Types

t()

@type t() :: %Predicator.Errors.UndefinedVariableError{
  message: binary(),
  variable: binary()
}

Functions

new(variable)

@spec new(binary()) :: t()

Creates an undefined variable error.