pub enum StackError {
Show 22 variants
IterationError,
StackEmpty,
PopOutOfBounds {
frame: usize,
},
SlotMissing {
slot: Slot,
},
SlotInaccessibleExclusive {
slot: Slot,
},
SlotInaccessibleShared {
slot: Slot,
},
UnexpectedSlotType {
expected: &'static str,
actual: &'static str,
},
ExpectedNone {
actual: ValueTypeInfo,
},
ExpectedBoolean {
actual: ValueTypeInfo,
},
ExpectedChar {
actual: ValueTypeInfo,
},
ExpectedInteger {
actual: ValueTypeInfo,
},
ExpectedFloat {
actual: ValueTypeInfo,
},
ExpectedString {
actual: ValueTypeInfo,
},
ExpectedArray {
actual: ValueTypeInfo,
},
ExpectedArrayLength {
actual: usize,
expected: usize,
},
ExpectedObject {
actual: ValueTypeInfo,
},
ExpectedExternal {
actual: ValueTypeInfo,
},
ExpectedManaged {
actual: ValueTypeInfo,
},
IncompatibleSlot,
ValueToIntegerCoercionError {
from: Integer,
to: &'static str,
},
IntegerToValueCoercionError {
from: Integer,
to: &'static str,
},
CorruptedStackFrame {
stack_top: usize,
frame_at: usize,
},
}Expand description
An error raised when interacting with types on the stack.
Variants§
IterationError
Internal error that happens when we run out of items in a list.
StackEmpty
stack is empty
PopOutOfBounds
Attempt to pop outside of current frame offset.
SlotMissing
The given slot is missing.
SlotInaccessibleExclusive
The given slot is inaccessible.
The given slot is inaccessible.
UnexpectedSlotType
Error raised when we expect a specific external type but got another.
Fields
ExpectedNone
Error raised when we expected a unit.
Fields
actual: ValueTypeInfoThe actual type found.
ExpectedBoolean
Error raised when we expected a boolean value.
Fields
actual: ValueTypeInfoThe actual type found.
ExpectedChar
Error raised when we expected a char value.
Fields
actual: ValueTypeInfoThe actual type found.
ExpectedInteger
Error raised when an integer value was expected.
Fields
actual: ValueTypeInfoThe actual type found.
ExpectedFloat
Error raised when we expected a float value.
Fields
actual: ValueTypeInfoThe actual type found.
ExpectedString
Error raised when we expected a string.
Fields
actual: ValueTypeInfoThe actual type observed instead.
ExpectedArray
Error raised when we expected a array.
Fields
actual: ValueTypeInfoThe actual type observed instead.
ExpectedArrayLength
Error raised when we expected an array of the given length.
ExpectedObject
Error raised when we expected a object.
Fields
actual: ValueTypeInfoThe actual type observed instead.
ExpectedExternal
Error raised when we expected an external value.
Fields
actual: ValueTypeInfoThe actual type observed instead.
ExpectedManaged
Error raised when we expected a managed value.
Fields
actual: ValueTypeInfoThe actual type observed instead.
IncompatibleSlot
Error raised when we expected a managed value with a specific slot.
ValueToIntegerCoercionError
Failure to convert a number into an integer.
Fields
from: IntegerNumber we tried to convert from.
IntegerToValueCoercionError
Failure to convert an integer into a value.
Fields
from: IntegerNumber we tried to convert from.
CorruptedStackFrame
We encountered a corrupted stack frame.