#[repr(u16)]pub enum ExecutionError {
Show 30 variants
UnwrapError = 1,
UnexpectedError = 2,
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,
EmptyDictionaryName = 121,
MissingArg = 122,
MissingAddress = 123,
OutOfGas = 124,
MaxUserError = 64_535,
UserErrorTooHigh = 64_536,
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.
UnexpectedError = 2
Something unexpected happened.
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
EmptyDictionaryName = 121
Empty dictionary name
MissingArg = 122
Calling a contract with missing entrypoint arguments.
MissingAddress = 123
Reading the address from the storage failed.
OutOfGas = 124
Out of gas error
MaxUserError = 64_535
Maximum code for user errors
UserErrorTooHigh = 64_536
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 more