pub enum NightjarLanguageError {
ParseError {
span: Span,
code: ErrorCode,
message: String,
},
TypeError {
span: Span,
code: ErrorCode,
message: String,
},
ArgumentError {
span: Span,
code: ErrorCode,
message: String,
},
SymbolNotFound {
span: Span,
code: ErrorCode,
message: String,
},
AmbiguousSymbol {
span: Span,
code: ErrorCode,
message: String,
},
DivisionByZero {
span: Span,
code: ErrorCode,
message: String,
},
RecursionError {
span: Span,
code: ErrorCode,
message: String,
},
IndexError {
span: Span,
code: ErrorCode,
message: String,
},
IntegerOverflow {
span: Span,
code: ErrorCode,
message: String,
},
ScopeError {
span: Span,
code: ErrorCode,
message: String,
},
}Expand description
Unified error type for the entire crate.
Variants§
ParseError
Expression does not conform to the grammar (E001).
Fields
TypeError
Operator applied to incompatible types (E002).
Fields
ArgumentError
Wrong number of operands for an operator (E003).
Fields
SymbolNotFound
Symbol path not present in the payload (E004).
Fields
AmbiguousSymbol
Reserved for a future shorthand-lookup mode; not raised today (E005).
Fields
DivisionByZero
Div or Mod invoked with a zero divisor (E006).
Fields
RecursionError
AST nesting exceeded the configured max_depth (E007).
Fields
IndexError
Get/Head/Tail ran off the end of a list (E008).
Fields
IntegerOverflow
Checked integer arithmetic overflowed (E009).
Fields
ScopeError
@ element-relative symbol used outside any quantifier predicate (E010).
Implementations§
Trait Implementations§
Source§impl Clone for NightjarLanguageError
impl Clone for NightjarLanguageError
Source§fn clone(&self) -> NightjarLanguageError
fn clone(&self) -> NightjarLanguageError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NightjarLanguageError
impl Debug for NightjarLanguageError
Source§impl Display for NightjarLanguageError
impl Display for NightjarLanguageError
Source§impl Error for NightjarLanguageError
impl Error for NightjarLanguageError
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()
Source§impl PartialEq for NightjarLanguageError
impl PartialEq for NightjarLanguageError
impl StructuralPartialEq for NightjarLanguageError
Auto Trait Implementations§
impl Freeze for NightjarLanguageError
impl RefUnwindSafe for NightjarLanguageError
impl Send for NightjarLanguageError
impl Sync for NightjarLanguageError
impl Unpin for NightjarLanguageError
impl UnsafeUnpin for NightjarLanguageError
impl UnwindSafe for NightjarLanguageError
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