pub enum Error {
UnexpectedChar {
at: Position,
ch: char,
},
UnexpectedEnd {
expected: &'static str,
},
UnexpectedToken {
at: Position,
expected: &'static str,
found: String,
},
UnboundVariable {
name: VarName,
},
FuelExhausted {
limit: u64,
},
DanglingReference {
address: Address,
},
NotAReference {
found: String,
},
NotAFunction {
found: String,
},
NotAnObject {
found: String,
},
PropertyNotFound {
name: VarName,
},
Thrown(Box<ThrownPayload>),
UncaughtException {
value: Value,
},
}Expand description
All errors in lambda-throw-cat.
Variants§
UnexpectedChar
The lexer encountered a character that does not begin any token.
UnexpectedEnd
Input ended while the parser still required more tokens.
UnexpectedToken
The parser found a token that does not satisfy the current production.
Fields
UnboundVariable
Evaluation referenced a variable not bound in the current environment.
FuelExhausted
Evaluation exceeded its step budget.
DanglingReference
A dereference, store, field access, or field assignment targeted an address not present in the heap.
NotAReference
Dereference or assignment was attempted on a value that is not a cell reference.
NotAFunction
Application was attempted with a non-function value.
NotAnObject
Field access or extend targeted a value that is not (or does not resolve to) an object.
PropertyNotFound
Field access walked the prototype chain to its end without finding the requested property.
Thrown(Box<ThrownPayload>)
A throw is propagating up the evaluation stack. Carries a boxed
ThrownPayload with the value, heap, and fuel at the throw site
so an enclosing try-catch can resume from there. Boxed to keep the
Result discriminant small.
UncaughtException
A throw escaped the top-level evaluation without being caught.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()