pub enum AvmError {
Show 26 variants
StackUnderflow,
StackOverflow {
limit: usize,
},
TypeError {
expected: String,
actual: String,
},
InvalidOpcode {
opcode: u8,
pc: usize,
},
ProgramCounterOutOfBounds {
pc: usize,
program_len: usize,
},
CostBudgetExceeded {
actual: u64,
limit: u64,
},
DivisionByZero,
IntegerOverflow,
IntegerUnderflow,
InvalidBranchTarget {
target: i32,
},
CallStackOverflow {
limit: usize,
},
CallStackUnderflow,
ScratchIndexOutOfBounds {
index: u8,
limit: u8,
},
InvalidByteArrayLength {
expected: usize,
actual: usize,
},
InvalidTransactionField {
field: String,
},
InvalidGlobalField {
field: String,
},
LedgerError(String),
StateError(String),
CryptoError(String),
InvalidProgram(String),
ExecutionHalted {
reason: String,
},
InvalidTealVersion {
version: u8,
},
UnsupportedVersion(u8),
OpcodeNotAvailable {
version: u8,
opcode: String,
},
AssemblyError(String),
ParseError(String),
}
Expand description
Comprehensive error types for AVM operations
Variants§
StackUnderflow
StackOverflow
TypeError
InvalidOpcode
ProgramCounterOutOfBounds
CostBudgetExceeded
DivisionByZero
IntegerOverflow
IntegerUnderflow
InvalidBranchTarget
CallStackOverflow
CallStackUnderflow
ScratchIndexOutOfBounds
InvalidByteArrayLength
InvalidTransactionField
InvalidGlobalField
LedgerError(String)
StateError(String)
CryptoError(String)
InvalidProgram(String)
ExecutionHalted
InvalidTealVersion
UnsupportedVersion(u8)
OpcodeNotAvailable
AssemblyError(String)
ParseError(String)
Implementations§
Source§impl AvmError
impl AvmError
Sourcepub fn ledger_error(msg: impl Into<String>) -> Self
pub fn ledger_error(msg: impl Into<String>) -> Self
Create a new ledger error
Sourcepub fn state_error(msg: impl Into<String>) -> Self
pub fn state_error(msg: impl Into<String>) -> Self
Create a new state error
Sourcepub fn crypto_error(msg: impl Into<String>) -> Self
pub fn crypto_error(msg: impl Into<String>) -> Self
Create a new crypto error
Sourcepub fn invalid_program(msg: impl Into<String>) -> Self
pub fn invalid_program(msg: impl Into<String>) -> Self
Create a new invalid program error
Sourcepub fn execution_halted(reason: impl Into<String>) -> Self
pub fn execution_halted(reason: impl Into<String>) -> Self
Create a new execution halted error
Sourcepub fn assembly_error(msg: impl Into<String>) -> Self
pub fn assembly_error(msg: impl Into<String>) -> Self
Create a new assembly error
Sourcepub fn parse_error(msg: impl Into<String>) -> Self
pub fn parse_error(msg: impl Into<String>) -> Self
Create a new parse error
Trait Implementations§
Source§impl Error for AvmError
impl Error for AvmError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Auto Trait Implementations§
impl Freeze for AvmError
impl RefUnwindSafe for AvmError
impl Send for AvmError
impl Sync for AvmError
impl Unpin for AvmError
impl UnwindSafe for AvmError
Blanket Implementations§
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