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
OutOfGasOutOfGas 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.
BadJumpDestinationBadJumpDestination is returned when execution tried to move
to position that wasn't marked with JUMPDEST instruction
Fields of BadJumpDestination
destination: usize | Position the code tried to jump to. |
BadInstructionBadInstructions is returned when given instruction is not supported
Fields of BadInstruction
instruction: u8 | Unrecognized opcode |
StackUnderflowStackUnderflow when there is not enough stack elements to execute instruction
Fields of StackUnderflow
instruction: &'static str | Invoked instruction |
wanted: usize | How many stack elements was requested by instruction |
on_stack: usize | How many elements were on stack |
OutOfStackWhen execution would exceed defined Stack Limit
Fields of OutOfStack
instruction: &'static str | Invoked instruction |
wanted: usize | How many stack elements instruction wanted to push |
limit: usize | What was the stack limit |
BuiltIn(&'static str)Built-in contract failed on given input
MutableCallInStaticContextWhen execution tries to modify the state in static context
Internal(String)Likely to cause consensus issues.
Wasm(String)Wasm runtime error
OutOfBoundsOut of bounds access in RETURNDATACOPY.
RevertedExecution has been reverted with REVERT.
Trait Implementations
impl Debug for Error[src]
impl Debug for Errorfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for Error[src]
impl Clone for Errorfn clone(&self) -> Error[src]
fn clone(&self) -> ErrorReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl PartialEq for Error[src]
impl PartialEq for Errorfn eq(&self, other: &Error) -> bool[src]
fn eq(&self, other: &Error) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Error) -> bool[src]
fn ne(&self, other: &Error) -> boolThis method tests for !=.
impl From<Box<TrieError>> for Error[src]
impl From<Box<TrieError>> for Errorimpl From<TrieError> for Error[src]
impl From<TrieError> for Errorimpl Display for Error[src]
impl Display for Error