Enum vm::Error[][src]

pub enum Error {
    OutOfGas,
    BadJumpDestination {
        destination: usize,
    },
    BadInstruction {
        instruction: u8,
    },
    StackUnderflow {
        instruction: &'static str,
        wanted: usize,
        on_stack: usize,
    },
    OutOfStack {
        instruction: &'static str,
        wanted: usize,
        limit: usize,
    },
    BuiltIn(&'static str),
    MutableCallInStaticContext,
    Internal(String),
    Wasm(String),
    OutOfBounds,
    Reverted,
}

VM errors.

Variants

OutOfGas is returned when transaction execution runs out of gas. The state should be reverted to the state from before the transaction execution. But it does not mean that transaction was invalid. Balance still should be transfered and nonce should be increased.

BadJumpDestination is returned when execution tried to move to position that wasn't marked with JUMPDEST instruction

Fields of BadJumpDestination

Position the code tried to jump to.

BadInstructions is returned when given instruction is not supported

Fields of BadInstruction

Unrecognized opcode

StackUnderflow when there is not enough stack elements to execute instruction

Fields of StackUnderflow

Invoked instruction

How many stack elements was requested by instruction

How many elements were on stack

When execution would exceed defined Stack Limit

Fields of OutOfStack

Invoked instruction

How many stack elements instruction wanted to push

What was the stack limit

Built-in contract failed on given input

When execution tries to modify the state in static context

Likely to cause consensus issues.

Wasm runtime error

Out of bounds access in RETURNDATACOPY.

Execution has been reverted with REVERT.

Trait Implementations

impl Debug for Error
[src]

Formats the value using the given formatter. Read more

impl Clone for Error
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Error
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl From<Box<TrieError>> for Error
[src]

Performs the conversion.

impl From<TrieError> for Error
[src]

Performs the conversion.

impl Display for Error
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Error

impl Sync for Error