pub enum EngineError {
Syntax(ParseError),
Semantic {
kind: ErrorKind,
message: String,
},
Runtime {
kind: ErrorKind,
message: String,
},
Storage(StorageError),
}Expand description
The typed engine error channel. Per ADR 0003 it has four variants:
EngineError::Syntaxwraps a parserParseErrorverbatim.EngineError::Semanticis a validation-time failure carrying anErrorKindand message.EngineError::Runtimeis a row-evaluation-time failure carrying anErrorKindand message.EngineError::Storagewraps aStorageErrorverbatim.
Display reproduces the pre-refactor strings byte-for-byte (see the crate
docs). kind() returns the finest TCK-aligned name; tck_class() returns
the coarser TCK class.
Variants§
Syntax(ParseError)
A parse-time failure. Renders as ParseError’s "parse error: …".
Semantic
A semantic (validation-time) failure.
Runtime
A runtime (row-evaluation-time) failure.
Storage(StorageError)
A storage-layer failure. Renders as StorageError’s message.
Implementations§
Source§impl EngineError
impl EngineError
Sourcepub fn undefined_variable(name: &str) -> Self
pub fn undefined_variable(name: &str) -> Self
A reference to a name the scope does not bind.
Sourcepub fn duplicate_variable(name: &str) -> Self
pub fn duplicate_variable(name: &str) -> Self
A binding that redeclares a name its scope already binds.
Sourcepub fn semantic(kind: ErrorKind, message: impl Into<String>) -> Self
pub fn semantic(kind: ErrorKind, message: impl Into<String>) -> Self
Construct a semantic error.
Sourcepub fn kind(&self) -> ErrorKind
pub fn kind(&self) -> ErrorKind
The finest TCK-aligned ErrorKind for this error.
A parse failure is a SyntaxError class, but if its ParseError
carries a detail tag (e.g. "IntegerOverflow"),
that finer kind is surfaced here so the TCK harness can match the
TCK’s <Detail> slot. The tag is never rendered, so Display is
unaffected.
Sourcepub fn tck_class(&self) -> TckErrorClass
pub fn tck_class(&self) -> TckErrorClass
The openCypher TCK error class for this error.
Trait Implementations§
Source§impl Clone for EngineError
impl Clone for EngineError
Source§impl Debug for EngineError
impl Debug for EngineError
Source§impl Display for EngineError
impl Display for EngineError
Source§impl Error for EngineError
impl Error for EngineError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()