Enum fuel_vm::error::InterpreterError
source · pub enum InterpreterError {
PanicInstruction(PanicInstruction),
Panic(PanicReason),
CheckError(CheckError),
PredicateFailure,
NoTransactionInitialized,
Io(Error),
}
Expand description
Interpreter runtime error variants.
Variants§
PanicInstruction(PanicInstruction)
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.
CheckError(CheckError)
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§
source§impl InterpreterError
impl InterpreterError
sourcepub fn from_runtime(error: RuntimeError, instruction: RawInstruction) -> Self
pub fn from_runtime(error: RuntimeError, instruction: RawInstruction) -> 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<&RawInstruction>
pub const fn instruction(&self) -> Option<&RawInstruction>
Return the instruction that caused this error, if applicable.
sourcepub fn instruction_result(&self) -> Option<PanicInstruction>
pub fn instruction_result(&self) -> Option<PanicInstruction>
Return the underlying InstructionResult
if this instance is
PanicInstruction
; returns None
otherwise.
Trait Implementations§
source§impl Debug for InterpreterError
impl Debug for InterpreterError
source§impl Display for InterpreterError
impl Display for InterpreterError
source§impl Error for InterpreterError
impl Error for InterpreterError
source§fn 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 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<Bug> for InterpreterError
impl From<Bug> for InterpreterError
source§impl From<CheckError> for InterpreterError
impl From<CheckError> for InterpreterError
source§fn from(source: CheckError) -> Self
fn from(source: CheckError) -> Self
Converts to this type from the input type.
source§impl From<Error> for InterpreterError
impl From<Error> for InterpreterError
source§impl From<Infallible> for InterpreterError
impl From<Infallible> for InterpreterError
source§fn from(_e: Infallible) -> InterpreterError
fn from(_e: Infallible) -> InterpreterError
Converts to this type from the input type.
source§impl From<InterpreterError> for Error
impl From<InterpreterError> for Error
source§fn from(e: InterpreterError) -> Self
fn from(e: InterpreterError) -> Self
Converts to this type from the input type.
source§impl From<InterpreterError> for PredicateVerificationFailed
impl From<InterpreterError> for PredicateVerificationFailed
source§fn from(error: InterpreterError) -> Self
fn from(error: InterpreterError) -> Self
Converts to this type from the input type.
source§impl From<RuntimeError> for InterpreterError
impl From<RuntimeError> for InterpreterError
source§fn from(error: RuntimeError) -> Self
fn from(error: RuntimeError) -> Self
Converts to this type from the input type.
source§impl PartialEq<InterpreterError> for InterpreterError
impl PartialEq<InterpreterError> for InterpreterError
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§
source§impl<T> AnyDebug for Twhere
T: Any + Debug,
impl<T> AnyDebug for Twhere T: Any + Debug,
source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
Returns a reference to the underlying type as
Any
.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