#[non_exhaustive]pub enum EngineError {
NoRuntime {
lang: String,
fn_hash: String,
},
UndeclaredInput {
fn_name: String,
},
Cycle {
cell_id: String,
},
DepthExceeded {
limit: usize,
},
BudgetExceeded {
fuel: u64,
},
WorkExceeded {
limit: u64,
},
NameUnresolved {
fn_name: String,
asof: String,
},
Store(StoreError),
Runtime {
cell_id: String,
message: String,
},
BlobUnavailable {
sha256: String,
reason: String,
},
Invalid(Error),
Sign(Error),
}Expand description
What Engine::get can fail with. For how each maps to a response
envelope, see the crate documentation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoRuntime
No runtime is configured for a function’s code.lang.
UndeclaredInput
A function read a function its descriptor does not declare in inputs.
Cycle
A cell depends on itself.
DepthExceeded
The evaluation stack reached the depth limit.
BudgetExceeded
The request’s fuel ran out: its normative fuel (SPEC 15.12) exceeds the limit. Nothing was stored for the request.
WorkExceeded
The request’s work ran out: every evaluation attempt (those a restart discarded
included) and the engine’s validation reads, which bound its total cost beyond the
normative fuel (EngineBuilder::work_limit).
Nothing was stored for the request. Since 0.3.0.
NameUnresolved
An input’s function name has no binding as of the request’s asof.
Store(StoreError)
The store failed.
Runtime
A runtime failed, or broke its contract (returned a value of another type than the
function declares, or Suspended without a pending input).
A function read a blob whose content the engine could not obtain or check (SPEC 15.7,
15.12: E_FORMULA_BLOB_UNAVAILABLE, the evaluator’s failure). Nothing was stored for
the request. Since 0.3.2.
Invalid(Error)
The request is malformed: an asof that is not an instant, a slice, arguments that do
not match the function’s signature; or a runtime read such an input. The core’s error
carries the code (E_CANON_INSTANT, E_SLICE, E_ARG_UNKNOWN, …). Added to the
brief’s list.
Sign(Error)
A computed receipt could not be signed: the core refused its members. In practice an
input whose asof is later than the engine’s clock (E_TIME_ORDER: asof <= issued).
Added to the brief’s list.
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()