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
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
BadJumpDestination
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. |
BadInstruction
BadInstructions
is returned when given instruction is not supported
Fields of BadInstruction
instruction: u8 | Unrecognized opcode |
StackUnderflow
StackUnderflow
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 |
OutOfStack
When 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
MutableCallInStaticContext
When execution tries to modify the state in static context
Internal(String)
Likely to cause consensus issues.
Wasm(String)
Wasm runtime error
OutOfBounds
Out of bounds access in RETURNDATACOPY.
Reverted
Execution has been reverted with REVERT.
Trait Implementations
impl Debug for Error
[src]
impl Debug for Error
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Error
[src]
impl Clone for Error
fn clone(&self) -> Error
[src]
fn clone(&self) -> Error
Returns 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 Error
fn eq(&self, other: &Error) -> bool
[src]
fn eq(&self, other: &Error) -> bool
This 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) -> bool
This method tests for !=
.
impl From<Box<TrieError>> for Error
[src]
impl From<Box<TrieError>> for Error
impl From<TrieError> for Error
[src]
impl From<TrieError> for Error
impl Display for Error
[src]
impl Display for Error