pub enum SusumuError {
Show 13 variants
LexerError {
line: usize,
column: usize,
message: String,
},
ParserError {
line: usize,
message: String,
},
RuntimeError {
message: String,
},
TypeError {
expected: String,
found: String,
},
UndefinedVariable {
name: String,
},
UndefinedFunction {
name: String,
},
FunctionCallError {
message: String,
},
ArrowChainError {
message: String,
},
UserError {
value: Value,
},
ReturnValue {
value: Value,
},
SuccessReturn {
value: Value,
},
ErrorReturn {
value: Value,
},
IoError {
message: String,
},
}Variants§
LexerError
ParserError
RuntimeError
TypeError
UndefinedVariable
UndefinedFunction
FunctionCallError
ArrowChainError
UserError
ReturnValue
SuccessReturn
ErrorReturn
IoError
Implementations§
Source§impl SusumuError
impl SusumuError
pub fn lexer_error( line: usize, column: usize, message: impl Into<String>, ) -> Self
pub fn parser_error(line: usize, message: impl Into<String>) -> Self
pub fn runtime_error(message: impl Into<String>) -> Self
pub fn type_error(expected: impl Into<String>, found: impl Into<String>) -> Self
pub fn undefined_variable(name: impl Into<String>) -> Self
pub fn undefined_function(name: impl Into<String>) -> Self
pub fn function_call_error(message: impl Into<String>) -> Self
pub fn arrow_chain_error(message: impl Into<String>) -> Self
pub fn user_error(value: Value) -> Self
pub fn return_value(value: Value) -> Self
pub fn success_return(value: Value) -> Self
pub fn error_return(value: Value) -> Self
pub fn io_error(message: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for SusumuError
impl Clone for SusumuError
Source§fn clone(&self) -> SusumuError
fn clone(&self) -> SusumuError
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 SusumuError
impl Debug for SusumuError
Source§impl Display for SusumuError
impl Display for SusumuError
Source§impl Error for SusumuError
impl Error for SusumuError
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 SusumuError
impl PartialEq for SusumuError
impl StructuralPartialEq for SusumuError
Auto Trait Implementations§
impl Freeze for SusumuError
impl RefUnwindSafe for SusumuError
impl Send for SusumuError
impl Sync for SusumuError
impl Unpin for SusumuError
impl UnwindSafe for SusumuError
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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