#[non_exhaustive]pub enum EngineError {
Show 17 variants
NoRuntime {
lang: String,
fn_hash: String,
},
UndeclaredInput {
fn_name: String,
},
Cycle {
path: Vec<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),
Unlicensed {
cell_id: String,
reason: LicenceReason,
},
NamespaceSuspended {
host: String,
suspended_at: String,
},
Sign(Error),
Override(String),
NotCovered {
fault: Option<Fault>,
},
WhatifNoSolution,
}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. path holds the canonical calls of the cycle in read order,
starting at the cell that reappeared and ending with it again (Build 2 E3: since 0.5.0).
DepthExceeded
The evaluation stack reached the depth limit. Since 0.5.0 a deeper evaluation splits itself instead (Build 2 E4), so this is not raised by the engine’s evaluation.
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.
Unlicensed
The mesh may not compute the cell under licence inheritance (SPEC 8.5, spec-0.4.3): its
input licences have no licence in common (share_alike_conflict,
restricted_conflict), or a restricted input licence is not declared for the function
by its publisher, open at the receipt’s issued (not_declared,
declaration_not_open). Nothing was signed or stored for the request. cell_id is
the refused cell: the requested one, or a cell it reads (a reader of a refused cell is
refused too). The HTTP layer answers unlicensed (403, no new code). Since 0.4.1.
Fields
reason: LicenceReasonWhy (never one of the reasons that give a licence).
NamespaceSuspended
A write the engine makes is under a suspended namespace (SPEC 9.9, store 0.4.1): the
store refused it with datumesh_store::Error::NamespaceSuspended, as the mesh’s own
namespace (the signer of its computed receipts) is suspended. Nothing was signed or
stored for the request; reads, verification and the receipts already stored go on.
Since 0.4.2.
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.
Override(String)
A scenario’s overrides are not valid (SPEC 5.9, Build 2 E1): the code is E_CANON_TYPE
(a value of another type than the cell’s), E_CANON_ARG_DUPLICATE (a cell or slice
overridden twice), E_SLICE_MEMBER (a removed cell that is not in the slice, a cell
both added and removed, an added cell outside the slice or already in it) or
E_CANON_LIMIT (more than 64 overrides). Since 0.5.0.
NotCovered
A scenario’s cell has no value, or a fault in its scope (not_covered): the fault if
any, as Answer::NotCovered. Since 0.5.0.
WhatifNoSolution
A solve found no solution (E_WHATIF_NO_SOLUTION): no sign change over the interval,
or the request’s fuel ran out before the bisection converged (never a partial answer).
Since 0.5.0.
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()
Source§impl From<StoreError> for EngineError
impl From<StoreError> for EngineError
Source§fn from(e: StoreError) -> EngineError
fn from(e: StoreError) -> EngineError
A store’s refusal of a write under a suspended namespace (SPEC 9.9) is
EngineError::NamespaceSuspended; any other store failure is EngineError::Store.