pub enum RunError<A: IVm> {
Thrown(Any<A>),
NoExport(String),
NotCallable(Any<A>),
Json(JsonError),
}Expand description
Why a run produced no JSON.
A throw is the language’s own failure — 1n / 0n, a property read on a
nullish base the compiler could not see — and the thrown value is an
ordinary Any<A>, reported as the value it is rather than turned into a
panic. NoExport and NotCallable are the caller’s mistakes, not the
program’s, so neither is reported as a throw.
Debug and PartialEq are written out rather than derived: a derive
would ask them of A itself, which no VM promises, where Any<A> has
both for every VM.
Variants§
Thrown(Any<A>)
The module threw while evaluating, or the called export threw.
NoExport(String)
export is not an own property of the export object: the name as
the caller passed it. It is the caller’s text, never a VM value, so
it compares and prints without a VM.
NotCallable(Any<A>)
Action::Call on a value that is not a function: that value.
Json(JsonError)
The selected value or call result has no JSON.