pub enum InstructionErrorKind {
Show 20 variants
InvocationInputIsMissing {
index: u32,
},
ToNative(WasmValueNativeCastError),
LoweringLifting {
from: IType,
to: IType,
},
InvalidValueOnTheStack {
expected_type: IType,
received_value: IValue,
},
StackIsTooSmall {
needed: usize,
},
LocalOrImportIsMissing {
function_index: u32,
},
LocalOrImportSignatureMismatch {
function_index: u32,
expected: (Vec<IType>, Vec<IType>),
received: (Vec<IType>, Vec<IType>),
},
LocalOrImportCall {
function_name: String,
},
MemoryIsMissing {
memory_index: usize,
},
MemoryOutOfBoundsAccess {
index: u32,
length: u32,
},
String(FromUtf8Error),
NegativeValue {
subject: &'static str,
},
TypeIsMissing {
type_index: u32,
},
RecordTypeByNameIsMissing {
record_type_id: u64,
},
CorruptedArray(String),
CorruptedRecord(String),
InvalidTypeKind {
expected_kind: TypeKind,
received_kind: TypeKind,
},
SerdeError(String),
LiError(LiError),
LoError(LoError),
}
Expand description
The kind of instruction errors.
Variants§
InvocationInputIsMissing
The instruction needs to read an invocation input at index index
, but it’s missing.
ToNative(WasmValueNativeCastError)
Failed to cast from a WIT value to a native value.
LoweringLifting
Failed to cast from from
to to
.
InvalidValueOnTheStack
Read a value from the stack, but it doesn’t have the expected type.
StackIsTooSmall
Need to read some values from the stack, but it doesn’t contain enough data.
LocalOrImportIsMissing
The local or import function doesn’t exist.
LocalOrImportSignatureMismatch
Fields
Values given to a local or import function doesn’t match the function signature.
LocalOrImportCall
Failed to call a local or import function.
MemoryIsMissing
The memory doesn’t exist.
MemoryOutOfBoundsAccess
Tried to read out of bounds of the memory.
String(FromUtf8Error)
The string contains invalid UTF-8 encoding.
NegativeValue
Out of range integral type conversion attempted.
TypeIsMissing
The type doesn’t exist.
RecordTypeByNameIsMissing
The searched by id type doesn’t exist.
CorruptedArray(String)
Corrupted array’s been popped from the stack.
CorruptedRecord(String)
Corrupted record’s been popped from the stack.
InvalidTypeKind
Read a type that has an unexpected type.
SerdeError(String)
Errors related to Serialization/deserialization of record.
LiError(LiError)
Errors related to lifting/lowering records.
LoError(LoError)
Errors related to incorrect writing to memory.