#[non_exhaustive]pub enum ExprError {
Show 15 variants
StepLimitExceeded(u64),
DepthExceeded(u32),
UnboundVariable(String),
TypeError {
expected: String,
got: String,
},
ArityMismatch {
op: String,
expected: usize,
got: usize,
},
IndexOutOfBounds {
index: i64,
len: usize,
},
FieldNotFound(String),
NonExhaustiveMatch,
DivisionByZero,
ListLengthExceeded(usize),
ParseError {
value: String,
target_type: String,
},
NotAFunction,
Overflow,
FloatNotRepresentable(String),
InternalDispatch {
op: String,
},
}Expand description
Errors that can occur during expression evaluation or type-checking.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
StepLimitExceeded(u64)
Evaluation exceeded the configured step limit.
DepthExceeded(u32)
Evaluation exceeded the configured recursion depth.
UnboundVariable(String)
A variable was referenced but not bound in the environment.
TypeError
An operation received a value of the wrong type.
ArityMismatch
A builtin was applied to the wrong number of arguments.
Fields
IndexOutOfBounds
List index was out of bounds.
FieldNotFound(String)
A field was not found in a record.
NonExhaustiveMatch
No pattern arm matched the scrutinee.
DivisionByZero
Division by zero.
ListLengthExceeded(usize)
A list operation exceeded the configured maximum list length.
ParseError
Failed to parse a string as a number.
Fields
NotAFunction
Attempted to call a non-function value.
Overflow
Integer arithmetic overflowed.
FloatNotRepresentable(String)
Float value is not representable as an integer (NaN, infinity, or out of range).
InternalDispatch
A builtin operation reached a category handler that does not implement it.
The top-level dispatch in apply_builtin
routes each BuiltinOp to the category handler
that implements it. This error signals a misrouted operation: a
per-category handler received an op outside its category.
Trait Implementations§
Source§impl Error for ExprError
impl Error for ExprError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()