pub enum EvalError {
}Expand description
Evaluation error — runtime traps, assertion failures, invariant violations.
Variants§
ArithmeticTrap(String)
Division by zero, sqrt of negative, overflow, etc.
AssertionFailed(String)
core.assert failure
InvariantViolation(String)
Invariant check failed after action commit
NilAccess(String)
Nil access: nil.field, nil[i], nil used as bool, etc.
UnwrapError(String)
? on an Err variant
UndefinedVariable(String)
Unknown variable
UndefinedAction(String)
Unknown action
TypeMismatch(String)
Type mismatch at runtime
StdlibError(String)
Stdlib call error
UnknownFunction(String)
Unknown module or function
GasExhausted
Gas exhaustion
Return(Value)
return statement (used internally for control flow)
Runtime(String)
Generic runtime error
Trait Implementations§
Source§impl Error for EvalError
impl Error for EvalError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for EvalError
impl !RefUnwindSafe for EvalError
impl Send for EvalError
impl Sync for EvalError
impl Unpin for EvalError
impl !UnwindSafe for EvalError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more