pub enum LemmaError {
Parse(Box<ErrorDetails>),
Semantic(Box<ErrorDetails>),
Runtime(Box<ErrorDetails>),
Engine(String),
CircularDependency(String),
ResourceLimitExceeded {
limit_name: String,
limit_value: String,
actual_value: String,
suggestion: String,
},
MultipleErrors(Vec<LemmaError>),
}Expand description
Error types for the Lemma system with source location tracking
Variants§
Parse(Box<ErrorDetails>)
Parse error with source location
Semantic(Box<ErrorDetails>)
Semantic validation error with source location
Runtime(Box<ErrorDetails>)
Runtime error during evaluation with source location
Engine(String)
Engine error without specific source location
CircularDependency(String)
Circular dependency error
ResourceLimitExceeded
Resource limit exceeded
MultipleErrors(Vec<LemmaError>)
Multiple errors collected together
Implementations§
Source§impl LemmaError
impl LemmaError
Sourcepub fn parse(
message: impl Into<String>,
span: Span,
source_id: impl Into<String>,
source_text: Arc<str>,
doc_name: impl Into<String>,
doc_start_line: usize,
) -> Self
pub fn parse( message: impl Into<String>, span: Span, source_id: impl Into<String>, source_text: Arc<str>, doc_name: impl Into<String>, doc_start_line: usize, ) -> Self
Create a parse error with source information
Sourcepub fn parse_with_suggestion(
message: impl Into<String>,
span: Span,
source_id: impl Into<String>,
source_text: Arc<str>,
doc_name: impl Into<String>,
doc_start_line: usize,
suggestion: impl Into<String>,
) -> Self
pub fn parse_with_suggestion( message: impl Into<String>, span: Span, source_id: impl Into<String>, source_text: Arc<str>, doc_name: impl Into<String>, doc_start_line: usize, suggestion: impl Into<String>, ) -> Self
Create a parse error with suggestion
Trait Implementations§
Source§impl Clone for LemmaError
impl Clone for LemmaError
Source§fn clone(&self) -> LemmaError
fn clone(&self) -> LemmaError
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 LemmaError
impl Debug for LemmaError
Source§impl Display for LemmaError
impl Display for LemmaError
Source§impl Error for LemmaError
impl Error for LemmaError
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 LemmaError
impl RefUnwindSafe for LemmaError
impl Send for LemmaError
impl Sync for LemmaError
impl Unpin for LemmaError
impl UnwindSafe for LemmaError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more