pub enum InvokeError {
FailedWithNoError,
UnknownTrap {
address: usize,
signal: &'static str,
},
TrapCode {
code: ExceptionCode,
srcloc: u32,
},
UnknownTrapCode {
trap_code: String,
srcloc: u32,
},
EarlyTrap(Box<RuntimeError>),
Breakpoint(Box<RuntimeError>),
}
Expand description
An error that happened while invoking a Wasm function.
Variants§
FailedWithNoError
Indicates an exceptional circumstance such as a bug in Wasmer (please file an issue!) or a hardware failure.
UnknownTrap
Indicates that a trap occurred that is not known to Wasmer.
Fields
TrapCode
A trap that Wasmer knows about occurred.
Fields
§
code: ExceptionCode
The type of exception.
UnknownTrapCode
A trap occurred that Wasmer knows about but it had a trap code that we weren’t expecting or that we do not handle. This error may be backend-specific.
Fields
EarlyTrap(Box<RuntimeError>)
An “early trap” occurred. TODO: document this properly
Breakpoint(Box<RuntimeError>)
Indicates that a breakpoint was hit. The inner value is dependent upon the middleware or backend being used.
Trait Implementations§
Source§impl Debug for InvokeError
impl Debug for InvokeError
Source§impl Display for InvokeError
impl Display for InvokeError
Source§impl Error for InvokeError
impl Error for InvokeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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<InvokeError> for RuntimeError
impl From<InvokeError> for RuntimeError
Source§fn from(other: InvokeError) -> RuntimeError
fn from(other: InvokeError) -> RuntimeError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for InvokeError
impl !RefUnwindSafe for InvokeError
impl Send for InvokeError
impl !Sync for InvokeError
impl Unpin for InvokeError
impl !UnwindSafe for InvokeError
Blanket Implementations§
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
Mutably borrows from an owned value. Read more