pub enum GfError {
Show 17 variants
NotImplemented(&'static str),
Parse {
diagnostic: Option<Box<ParseError>>,
msg: String,
span: Span,
},
Bind {
diagnostics: Vec<BindError>,
msg: String,
span: Span,
},
Lowering(LoweringError),
LoweringExecution(LoweringError),
BindPlan {
msg: String,
diagnostics: Vec<BindError>,
},
BindValidation {
msg: String,
diagnostics: Vec<BindError>,
},
Algorithm(AlgorithmError),
Plan(String),
Execution(String),
Provider {
class: String,
provider: String,
model: String,
},
Storage(String),
Project {
code: ProjectErrorCode,
message: String,
},
Api {
code: ApiErrorCode,
message: String,
},
Lifecycle(String),
Validation(String),
Ontology(String),
}Expand description
Shared error classifications used by the engine facade and bindings.
Compiler stages, I/O, discovery, and other subsystems also expose dedicated
error types. Boundary adapters classify them as needed; GfError::code
supplies stable public codes rather than a one-to-one variant/exception map.
Variants§
NotImplemented(&'static str)
Feature exists in the API but has not been implemented yet.
Parse
The Cypher parser rejected the input.
Fields
diagnostic: Option<Box<ParseError>>Original typed parser diagnostic, when supplied by the parser.
Bind
The binder rejected the query (e.g. undeclared variable, strict-mode
unknown label). Carries the source span of the first error so callers
can point at the offending token; msg lists every binder error.
Publicly classified with GfError::Parse as GF_PARSE / ParseError
— semantic query-structure failures share the parse fault domain.
Fields
Lowering(LoweringError)
A lowering failure with its original kind and payload.
LoweringExecution(LoweringError)
A lowering diagnostic discovered at an execution boundary. Keeps the established runtime fault domain rather than reclassifying it.
BindPlan
A legacy EXPLAIN binder rejection in the established planning domain.
Fields
BindValidation
A binder rejection in the established validation fault domain.
Fields
Algorithm(AlgorithmError)
An algorithm failure retaining its original kind and payload.
Plan(String)
The binder or query planner could not produce a valid plan.
Execution(String)
A runtime fault occurred during query execution.
Provider
A redacted configured-provider invocation failed.
Fields
Storage(String)
A storage I/O operation failed.
Project
The project container cannot be resolved safely.
Fields
code: ProjectErrorCodeStable public error code.
Api
A structured knowledge/epistemic public API failure.
Fields
code: ApiErrorCodeStable closed public error code.
Lifecycle(String)
An operation was invalid for the current instance lifecycle state.
Validation(String)
Input failed validation at the API boundary.
Ontology(String)
An ontology file could not be loaded or applied.
Implementations§
Source§impl GfError
impl GfError
Sourcepub fn from_plan_error(error: impl Error + 'static) -> Self
pub fn from_plan_error(error: impl Error + 'static) -> Self
Preserve a GraphForge source when a planner wraps it in another error.
Foreign failures without a GraphForge source retain the existing
GF_PLAN classification and diagnostic. Source traversal uses Rust’s
error identity, never diagnostic text.
Sourcepub fn from_execution_error(error: impl Error + 'static) -> Self
pub fn from_execution_error(error: impl Error + 'static) -> Self
Preserve a GraphForge source when execution wraps it in another error.
This also handles shared foreign errors: cloning the GraphForge value
retains its typed code, variant, message, and source span without needing
exclusive ownership of an upstream error. Foreign failures without a
GraphForge source retain GF_EXECUTION and their existing diagnostic.
Source§impl GfError
impl GfError
Sourcepub fn from_parse_display(error: ParseError) -> Self
pub fn from_parse_display(error: ParseError) -> Self
Preserve the legacy EXPLAIN display while retaining the full parser diagnostic.
Sourcepub fn from_bind_plan_errors(errors: &[BindError]) -> Self
pub fn from_bind_plan_errors(errors: &[BindError]) -> Self
Preserve legacy cypher EXPLAIN’s planning domain and message.
Sourcepub fn from_bind_errors(errors: &[BindError]) -> Self
pub fn from_bind_errors(errors: &[BindError]) -> Self
Preserve every binder diagnostic and the established primary span/message.
Trait Implementations§
Source§impl Error for GfError
impl Error for GfError
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()