pub enum OakErrorKind {
IoError {
error: Error,
url: Option<Url>,
},
SyntaxError {
message: String,
source: SourceLocation,
},
UnexpectedCharacter {
character: char,
source: SourceLocation,
},
CustomError {
message: String,
},
}Expand description
Enumeration of all possible error kinds in the Oak Core framework.
This enum categorizes different types of language that can occur during parsing operations, each with specific associated data relevant to that error type.
Variants§
IoError
I/O error that occurred while reading source files.
Fields
SyntaxError
Syntax error encountered during parsing.
Fields
§
source: SourceLocationLocation in the source code where the error occurred.
UnexpectedCharacter
Unexpected character encountered during lexical analysis.
Fields
§
source: SourceLocationLocation in the source code where the unexpected character was found.
CustomError
Custom error for user-defined error conditions.
Trait Implementations§
Source§impl Clone for OakErrorKind
impl Clone for OakErrorKind
Source§impl Debug for OakErrorKind
impl Debug for OakErrorKind
Source§impl Display for OakErrorKind
impl Display for OakErrorKind
Source§impl Error for OakErrorKind
impl Error for OakErrorKind
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 From<OakErrorKind> for OakError
impl From<OakErrorKind> for OakError
Source§fn from(kind: OakErrorKind) -> Self
fn from(kind: OakErrorKind) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OakErrorKind
impl !RefUnwindSafe for OakErrorKind
impl Send for OakErrorKind
impl Sync for OakErrorKind
impl Unpin for OakErrorKind
impl !UnwindSafe for OakErrorKind
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