#[repr(u8)]pub enum Error {
Show 16 variants
Other {
dispatch_error_index: u8,
error_index: u8,
error: u8,
},
CannotLookup = 1,
BadOrigin = 2,
Module {
index: u8,
error: u8,
},
ConsumerRemaining = 4,
NoProviders = 5,
TooManyConsumers = 6,
Token(TokenError),
Arithmetic(ArithmeticError),
Transactional(TransactionalError),
Exhausted = 10,
Corruption = 11,
Unavailable = 12,
RootNotAllowed = 13,
UnknownCall = 254,
DecodingFailed = 255,
}Expand description
Reason why a Pop API call failed.
Variants§
Other
An unknown error occurred. This variant captures any unexpected errors that the contract cannot specifically handle. It is useful for cases where there are breaking changes in the runtime or when an error falls outside the predefined categories. The variant includes:
dispatch_error_index: The index within theDispatchError.error_index: The index within theDispatchErrorvariant (e.g. aTokenError).error: The specific error code or sub-index, providing additional context (e.g.errorinModuleError).
CannotLookup = 1
Failed to lookup some data.
BadOrigin = 2
A bad origin.
Module
A custom error in a module.
index: The pallet index.error: The error within the pallet.
ConsumerRemaining = 4
At least one consumer is remaining so the account cannot be destroyed.
NoProviders = 5
There are no providers so the account cannot be created.
TooManyConsumers = 6
There are too many consumers so the account cannot be created.
Token(TokenError)
An error to do with tokens.
Arithmetic(ArithmeticError)
An arithmetic error.
Transactional(TransactionalError)
The number of transactional layers has been reached, or we are not in a transactional layer.
Exhausted = 10
Resources exhausted, e.g. attempt to read/write data which is too large to manipulate.
Corruption = 11
The state is corrupt; this is generally not going to fix itself.
Some resource (e.g. a preimage) is unavailable right now. This might fix itself later.
RootNotAllowed = 13
Root origin is not allowed.
UnknownCall = 254
Unknown call.
DecodingFailed = 255
Decoding failed.