pub enum FunctionCallError {
CompilationError(CompilationError),
LinkError {
msg: String,
},
MethodResolveError(MethodResolveError),
WasmTrap(WasmTrap),
HostError(HostError),
}
Expand description
Permitted errors that cause a function call to fail gracefully.
Occurrence of such errors will be included in the merklize state on chain using a single bit to signal failure vs Success.
See the doc comment on VMResult
for an explanation what the difference
between this and a VMRunnerError
is. And see PartialExecutionStatus
for what gets stored on chain.
Variants§
CompilationError(CompilationError)
Wasm compilation error
LinkError
Wasm binary env link error
MethodResolveError(MethodResolveError)
Import/export resolve error
WasmTrap(WasmTrap)
A trap happened during execution of a binary
HostError(HostError)
Trait Implementations§
source§impl Debug for FunctionCallError
impl Debug for FunctionCallError
source§impl Display for FunctionCallError
impl Display for FunctionCallError
source§impl<'_derivative_strum> From<&'_derivative_strum FunctionCallError> for &'static str
impl<'_derivative_strum> From<&'_derivative_strum FunctionCallError> for &'static str
source§fn from(x: &'_derivative_strum FunctionCallError) -> &'static str
fn from(x: &'_derivative_strum FunctionCallError) -> &'static str
source§impl From<FunctionCallError> for &'static str
impl From<FunctionCallError> for &'static str
source§fn from(x: FunctionCallError) -> &'static str
fn from(x: FunctionCallError) -> &'static str
source§impl From<FunctionCallError> for FunctionCallErrorSer
impl From<FunctionCallError> for FunctionCallErrorSer
source§fn from(outer_err: FunctionCallError) -> Self
fn from(outer_err: FunctionCallError) -> Self
source§impl From<PrepareError> for FunctionCallError
impl From<PrepareError> for FunctionCallError
source§fn from(err: PrepareError) -> Self
fn from(err: PrepareError) -> Self
source§impl PartialEq<FunctionCallError> for FunctionCallError
impl PartialEq<FunctionCallError> for FunctionCallError
source§fn eq(&self, other: &FunctionCallError) -> bool
fn eq(&self, other: &FunctionCallError) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<VMLogicError> for FunctionCallError
impl TryFrom<VMLogicError> for FunctionCallError
Try to convert a general error that happened at the VMLogic
level to a
FunctionCallError
that can be included in a VMOutcome
.
VMLogicError
have two very different types of errors. Some are just
a result from the guest code doing incorrect things, other are bugs in
nearcore.
The first type can be converted to a FunctionCallError
, the other becomes
a VMRunnerError
instead and must be treated differently.