Enum odra_core::ExecutionError
source · #[repr(u16)]pub enum ExecutionError {
Show 25 variants
UnwrapError = 1,
AdditionOverflow = 100,
SubtractionOverflow = 101,
NonPayable = 102,
TransferToContract = 103,
ReentrantCall = 104,
ContractAlreadyInstalled = 105,
UnknownConstructor = 106,
NativeTransferError = 107,
IndexOutOfBounds = 108,
ZeroAddress = 109,
AddressCreationFailed = 110,
EarlyEndOfStream = 111,
Formatting = 112,
LeftOverBytes = 113,
OutOfMemory = 114,
NotRepresentable = 115,
ExceededRecursionDepth = 116,
KeyNotFound = 117,
CouldNotDeserializeSignature = 118,
TypeMismatch = 119,
CouldNotSignMessage = 120,
MaxUserError = 32_767,
UserErrorTooHigh = 32_768,
User(u16),
}Expand description
An error that can occur during smart contract execution
It is represented by an error code and a human-readable message.
Errors codes 0..32767 are available for the user to define custom error in smart contracts. 32768 code is a special code representing a violation of the custom error code space.
The rest of codes 32769..u16::MAX, are used internally by the framework.
Variants§
UnwrapError = 1
Unwrap error
AdditionOverflow = 100
Addition overflow
SubtractionOverflow = 101
Subtraction overflow
NonPayable = 102
Method does not accept deposit
TransferToContract = 103
Can’t transfer tokens to contract.
ReentrantCall = 104
Reentrant call detected
ContractAlreadyInstalled = 105
Contract already installed
UnknownConstructor = 106
Unknown constructor
NativeTransferError = 107
Native transfer error
IndexOutOfBounds = 108
Index out of bounds
ZeroAddress = 109
Tried to construct a zero address.
AddressCreationFailed = 110
Address creation failed
EarlyEndOfStream = 111
Early end of stream - deserialization error
Formatting = 112
Formatting error - deserialization error
LeftOverBytes = 113
Left over bytes - deserialization error
OutOfMemory = 114
Out of memory
NotRepresentable = 115
Not representable
ExceededRecursionDepth = 116
Exceeded recursion depth
KeyNotFound = 117
Key not found
CouldNotDeserializeSignature = 118
Could not deserialize signature
TypeMismatch = 119
Type mismatch
CouldNotSignMessage = 120
Could not sign message
MaxUserError = 32_767
Maximum code for user errors
UserErrorTooHigh = 32_768
User error too high. The code should be in range 0..32767.
User(u16)
User error
Implementations§
Trait Implementations§
source§impl Clone for ExecutionError
impl Clone for ExecutionError
source§fn clone(&self) -> ExecutionError
fn clone(&self) -> ExecutionError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ExecutionError
impl Debug for ExecutionError
source§impl From<AddressError> for ExecutionError
impl From<AddressError> for ExecutionError
source§fn from(error: AddressError) -> Self
fn from(error: AddressError) -> Self
source§impl From<ArithmeticsError> for ExecutionError
impl From<ArithmeticsError> for ExecutionError
source§fn from(error: ArithmeticsError) -> Self
fn from(error: ArithmeticsError) -> Self
source§impl From<CollectionError> for ExecutionError
impl From<CollectionError> for ExecutionError
source§fn from(error: CollectionError) -> Self
fn from(error: CollectionError) -> Self
source§impl From<Error> for ExecutionError
impl From<Error> for ExecutionError
source§impl From<ExecutionError> for OdraError
impl From<ExecutionError> for OdraError
source§fn from(error: ExecutionError) -> Self
fn from(error: ExecutionError) -> Self
source§impl PartialEq for ExecutionError
impl PartialEq for ExecutionError
source§fn eq(&self, other: &ExecutionError) -> bool
fn eq(&self, other: &ExecutionError) -> bool
self and other values to be equal, and is used
by ==.impl Copy for ExecutionError
impl StructuralPartialEq for ExecutionError
Auto Trait Implementations§
impl Freeze for ExecutionError
impl RefUnwindSafe for ExecutionError
impl Send for ExecutionError
impl Sync for ExecutionError
impl Unpin for ExecutionError
impl UnwindSafe for ExecutionError
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
source§impl<T> FmtForward for T
impl<T> FmtForward for T
source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.source§impl<T> PipeAsRef for T
impl<T> PipeAsRef for T
source§impl<T> PipeBorrow for T
impl<T> PipeBorrow for T
source§impl<T> PipeDeref for T
impl<T> PipeDeref for T
source§impl<T> PipeRef for T
impl<T> PipeRef for T
source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_dbg<F, R>(self, func: F) -> Self
fn tap_dbg<F, R>(self, func: F) -> Self
tap in debug builds, and does nothing in release builds.source§fn tap_mut_dbg<F, R>(self, func: F) -> Self
fn tap_mut_dbg<F, R>(self, func: F) -> Self
tap_mut in debug builds, and does nothing in release builds.source§impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
source§fn tap_ref<F, R>(self, func: F) -> Self
fn tap_ref<F, R>(self, func: F) -> Self
source§fn tap_ref_dbg<F, R>(self, func: F) -> Self
fn tap_ref_dbg<F, R>(self, func: F) -> Self
tap_ref in debug builds, and does nothing in release builds.source§fn tap_ref_mut<F, R>(self, func: F) -> Self
fn tap_ref_mut<F, R>(self, func: F) -> Self
source§impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
source§fn tap_borrow<F, R>(self, func: F) -> Self
fn tap_borrow<F, R>(self, func: F) -> Self
source§fn tap_borrow_dbg<F, R>(self, func: F) -> Self
fn tap_borrow_dbg<F, R>(self, func: F) -> Self
tap_borrow in debug builds, and does nothing in release builds.source§fn tap_borrow_mut<F, R>(self, func: F) -> Self
fn tap_borrow_mut<F, R>(self, func: F) -> Self
source§impl<T> TapDeref for T
impl<T> TapDeref for T
source§fn tap_deref_dbg<F, R>(self, func: F) -> Self
fn tap_deref_dbg<F, R>(self, func: F) -> Self
tap_deref in debug builds, and does nothing in release builds.source§fn tap_deref_mut<F, R>(self, func: F) -> Self
fn tap_deref_mut<F, R>(self, func: F) -> Self
self for modification.