pub enum RuneError {
SyntaxError {
message: String,
line: usize,
column: usize,
hint: Option<String>,
code: Option<u32>,
},
InvalidToken {
token: String,
line: usize,
column: usize,
hint: Option<String>,
code: Option<u32>,
},
UnexpectedEof {
message: String,
line: usize,
column: usize,
hint: Option<String>,
code: Option<u32>,
},
TypeError {
message: String,
line: usize,
column: usize,
hint: Option<String>,
code: Option<u32>,
},
UnclosedString {
quote: char,
line: usize,
column: usize,
hint: Option<String>,
code: Option<u32>,
},
UnexpectedCharacter {
character: char,
line: usize,
column: usize,
hint: Option<String>,
code: Option<u32>,
},
FileError {
message: String,
path: String,
hint: Option<String>,
code: Option<u32>,
},
RuntimeError {
message: String,
hint: Option<String>,
code: Option<u32>,
},
ValidationError {
message: String,
line: usize,
column: usize,
hint: Option<String>,
code: Option<u32>,
},
}Expand description
The main error type for RUNE parsing and lexing.
Variants§
SyntaxError
InvalidToken
UnexpectedEof
TypeError
UnclosedString
Raised when a string literal is not closed.
UnexpectedCharacter
Raised for unexpected characters or tokens.
FileError
RuntimeError
Raised for runtime issues, such as missing environment variables.
ValidationError
Implementations§
Trait Implementations§
Source§impl Error for RuneError
impl Error for RuneError
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()
impl StructuralPartialEq for RuneError
Auto Trait Implementations§
impl Freeze for RuneError
impl RefUnwindSafe for RuneError
impl Send for RuneError
impl Sync for RuneError
impl Unpin for RuneError
impl UnsafeUnpin for RuneError
impl UnwindSafe for RuneError
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