pub enum OakErrorKind {
Show 17 variants
IoError {
error: Error,
url: Option<Url>,
},
SyntaxError {
message: String,
offset: usize,
url: Option<Url>,
},
UnexpectedCharacter {
character: char,
offset: usize,
url: Option<Url>,
},
UnexpectedToken {
token: String,
offset: usize,
url: Option<Url>,
},
UnexpectedEof {
offset: usize,
url: Option<Url>,
},
CustomError {
message: String,
},
InvalidTheme {
message: String,
},
UnsupportedFormat {
format: String,
},
ColorParseError {
color: String,
},
FormatError {
message: String,
},
SemanticError {
message: String,
},
ProtocolError {
message: String,
},
ExpectedToken {
expected: String,
offset: usize,
url: Option<Url>,
},
ExpectedName {
name_kind: String,
offset: usize,
url: Option<Url>,
},
TrailingCommaNotAllowed {
offset: usize,
url: Option<Url>,
},
TestFailure {
path: PathBuf,
expected: String,
actual: String,
},
TestRegenerated {
path: PathBuf,
},
}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
UnexpectedCharacter
Unexpected character encountered during lexical analysis.
Fields
UnexpectedToken
Unexpected token encountered during parsing.
Fields
UnexpectedEof
Unexpected end of file encountered during parsing.
Fields
CustomError
Custom error for user-defined error conditions.
InvalidTheme
Invalid theme error for highlighting.
UnsupportedFormat
Unsupported format error for exporting.
ColorParseError
Color parsing error for themes.
FormatError
Formatting error.
SemanticError
Semantic error.
ProtocolError
Protocol error (e.g., MCP, LSP).
ExpectedToken
Expected a specific token.
Fields
ExpectedName
Expected a name (identifier).
Fields
TrailingCommaNotAllowed
Trailing comma is not allowed.
Fields
TestFailure
Test failure error.
Fields
TestRegenerated
Test expected result file was missing or regenerated.