Enum fuel_vm::error::InterpreterError
source · [−]pub enum InterpreterError {
PanicInstruction(InstructionResult),
Panic(PanicReason),
ValidationError(ValidationError),
PredicateFailure,
NoTransactionInitialized,
Io(Error),
}
Expand description
Interpreter runtime error variants.
Variants
PanicInstruction(InstructionResult)
The instructions execution resulted in a well-formed panic, caused by an explicit instruction.
Panic(PanicReason)
The VM execution resulted in a well-formed panic. This panic wasn’t caused by an instruction contained in the transaction or a called contract.
ValidationError(ValidationError)
The provided transaction isn’t valid.
PredicateFailure
The predicate verification failed.
NoTransactionInitialized
No transaction was initialized in the interpreter. It cannot provide state transitions.
Io(Error)
I/O and OS related errors.
Implementations
sourceimpl InterpreterError
impl InterpreterError
sourcepub fn from_runtime(error: RuntimeError, instruction: Instruction) -> Self
pub fn from_runtime(error: RuntimeError, instruction: Instruction) -> Self
Describe the error as recoverable or halt.
sourcepub const fn panic_reason(&self) -> Option<PanicReason>
pub const fn panic_reason(&self) -> Option<PanicReason>
Return the specified panic reason that caused this error, if applicable.
sourcepub const fn instruction(&self) -> Option<&Instruction>
pub const fn instruction(&self) -> Option<&Instruction>
Return the instruction that caused this error, if applicable.
sourcepub fn instruction_result(&self) -> Option<&InstructionResult>
pub fn instruction_result(&self) -> Option<&InstructionResult>
Return the underlying InstructionResult
if this instance is
PanicInstruction
; returns None
otherwise.
Trait Implementations
sourceimpl Debug for InterpreterError
impl Debug for InterpreterError
sourceimpl Display for InterpreterError
impl Display for InterpreterError
sourceimpl Error for InterpreterError
impl Error for InterpreterError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<Bug> for InterpreterError
impl From<Bug> for InterpreterError
sourceimpl From<Error> for InterpreterError
impl From<Error> for InterpreterError
sourceimpl From<Infallible> for InterpreterError
impl From<Infallible> for InterpreterError
sourcefn from(_e: Infallible) -> InterpreterError
fn from(_e: Infallible) -> InterpreterError
Converts to this type from the input type.
sourceimpl From<InstructionResult> for InterpreterError
impl From<InstructionResult> for InterpreterError
sourcefn from(r: InstructionResult) -> InterpreterError
fn from(r: InstructionResult) -> InterpreterError
Converts to this type from the input type.
sourceimpl From<InterpreterError> for Error
impl From<InterpreterError> for Error
sourcefn from(e: InterpreterError) -> Self
fn from(e: InterpreterError) -> Self
Converts to this type from the input type.
sourceimpl From<RuntimeError> for InterpreterError
impl From<RuntimeError> for InterpreterError
sourcefn from(error: RuntimeError) -> Self
fn from(error: RuntimeError) -> Self
Converts to this type from the input type.
sourceimpl From<ValidationError> for InterpreterError
impl From<ValidationError> for InterpreterError
sourcefn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for InterpreterError
impl Send for InterpreterError
impl Sync for InterpreterError
impl Unpin for InterpreterError
impl !UnwindSafe for InterpreterError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more