pub enum VMError {
Show 23 variants
InvalidArguments,
ContractPanic(String),
MemoryNotFound,
InstrumentationError(InstrumentationError),
InvalidABICall,
InvalidUtf8,
InvalidEd25519PublicKey,
InvalidEd25519Signature,
ContractReturn(i32, i32),
OutOfGas,
NotEnoughFunds,
UnknownContract,
WASMError(Error),
IOError(Error),
InvalidWASMModule,
StoreError(CanonError),
PersistenceSerializationError(CanonError),
PersistenceError(String),
WasmerExportError(ExportError),
WasmerRuntimeError(RuntimeError),
WasmerCompileError(CompileError),
WasmerTrap(TrapCode),
WasmerInstantiationError(InstantiationError),
}Expand description
The errors that can happen while executing the VM
Variants§
InvalidArguments
Invalid arguments in host call
ContractPanic(String)
The contract panicked with message in String
MemoryNotFound
Could not find WASM memory
InstrumentationError(InstrumentationError)
Error during the instrumentalization
InvalidABICall
Invalid ABI Call
InvalidUtf8
Invalid Utf8
InvalidEd25519PublicKey
Invalid Public key
InvalidEd25519Signature
Invalid Signature
ContractReturn(i32, i32)
Contract returned, not an error per se, this is how contracts return.
OutOfGas
Contract execution ran out of gas
NotEnoughFunds
Not enough funds for call
UnknownContract
Contract could not be found in the state
WASMError(Error)
WASM threw an error
IOError(Error)
Input output error
InvalidWASMModule
Invalid WASM Module
StoreError(CanonError)
Error propagated from underlying store
PersistenceSerializationError(CanonError)
Serialization error from the state persistence mechanism
PersistenceError(String)
Other error from the state persistence mechanism
WasmerExportError(ExportError)
WASMER export error
WasmerRuntimeError(RuntimeError)
WASMER runtime error
WasmerCompileError(CompileError)
WASMER compile error
WasmerTrap(TrapCode)
WASMER trap
WasmerInstantiationError(InstantiationError)
WASMER instantiation error
Implementations§
Source§impl VMError
impl VMError
Sourcepub fn from_store_error(err: CanonError) -> Self
pub fn from_store_error(err: CanonError) -> Self
Create a VMError from the associated stores
Trait Implementations§
Source§impl Error for VMError
impl Error for VMError
1.30.0 · 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
Source§impl From<CompileError> for VMError
impl From<CompileError> for VMError
Source§fn from(e: CompileError) -> Self
fn from(e: CompileError) -> Self
Source§impl From<ExportError> for VMError
impl From<ExportError> for VMError
Source§fn from(e: ExportError) -> Self
fn from(e: ExportError) -> Self
Source§impl From<InstantiationError> for VMError
impl From<InstantiationError> for VMError
Source§fn from(e: InstantiationError) -> Self
fn from(e: InstantiationError) -> Self
Source§impl From<RuntimeError> for VMError
impl From<RuntimeError> for VMError
Source§fn from(e: RuntimeError) -> Self
fn from(e: RuntimeError) -> Self
Auto Trait Implementations§
impl Freeze for VMError
impl !RefUnwindSafe for VMError
impl Send for VMError
impl Sync for VMError
impl Unpin for VMError
impl !UnwindSafe for VMError
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<E> Fail for E
impl<E> Fail for E
Source§fn cause(&self) -> Option<&(dyn Fail + 'static)>
fn cause(&self) -> Option<&(dyn Fail + 'static)>
Source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Backtrace carried by this failure, if it
carries one. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more