Enum near_vm_errors::VMLogicError
source · pub enum VMLogicError {
HostError(HostError),
ExternalError(AnyError),
InconsistentStateError(InconsistentStateError),
}
Variants§
HostError(HostError)
Errors coming from native Wasm VM.
ExternalError(AnyError)
Type erased error from External
trait implementation.
InconsistentStateError(InconsistentStateError)
An error that is caused by an operation on an inconsistent state.
Trait Implementations§
source§impl Debug for VMLogicError
impl Debug for VMLogicError
source§impl Display for VMLogicError
impl Display for VMLogicError
source§impl Error for VMLogicError
impl Error for VMLogicError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<HostError> for VMLogicError
impl From<HostError> for VMLogicError
source§impl From<InconsistentStateError> for VMLogicError
impl From<InconsistentStateError> for VMLogicError
source§fn from(err: InconsistentStateError) -> Self
fn from(err: InconsistentStateError) -> Self
Converts to this type from the input type.
source§impl PartialEq<VMLogicError> for VMLogicError
impl PartialEq<VMLogicError> for VMLogicError
source§fn eq(&self, other: &VMLogicError) -> bool
fn eq(&self, other: &VMLogicError) -> bool
This method tests for
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.
§type Error = VMRunnerError
type Error = VMRunnerError
The type returned in the event of a conversion error.