pub enum VmError {
Diagnostic(Diagnostic),
StackUnderflow,
StackOverflow,
InvalidOpcode(u8),
CodeOutOfBounds,
InvalidConstant(u16),
InvalidFunction(u16),
InvalidLocal(u16),
DivisionByZero,
BudgetExhausted,
TypeMismatch(&'static str),
NoReturnValue,
}Expand description
VM execution error.
Variants§
Diagnostic(Diagnostic)
A Diagnostic from the VibeScript error system.
StackUnderflow
Stack underflow (not enough values on the stack).
StackOverflow
Stack overflow (too many values on the stack).
InvalidOpcode(u8)
Invalid opcode byte.
CodeOutOfBounds
Code pointer out of bounds.
InvalidConstant(u16)
Invalid constant index.
InvalidFunction(u16)
Invalid function index.
InvalidLocal(u16)
Invalid local variable slot.
DivisionByZero
Division by zero.
BudgetExhausted
Budget exhausted.
TypeMismatch(&'static str)
Type mismatch at runtime.
NoReturnValue
No return value on the stack when one was expected.
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)>
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<Diagnostic> for VmError
impl From<Diagnostic> for VmError
Source§fn from(d: Diagnostic) -> Self
fn from(d: Diagnostic) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for VmError
Auto Trait Implementations§
impl Freeze for VmError
impl RefUnwindSafe for VmError
impl Send for VmError
impl Sync for VmError
impl Unpin for VmError
impl UnsafeUnpin for VmError
impl UnwindSafe for VmError
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