Enum fvm_shared::error::ErrorNumber
source · #[non_exhaustive]
#[repr(u32)]
pub enum ErrorNumber {
IllegalArgument,
IllegalOperation,
LimitExceeded,
AssertionFailed,
InsufficientFunds,
NotFound,
InvalidHandle,
IllegalCid,
IllegalCodec,
Serialization,
Forbidden,
BufferTooSmall,
}Expand description
When a syscall fails, it returns an ErrorNumber to indicate why. The syscalls themselves
include documentation on which syscall errors they can be expected to return, and what they
mean in the context of the syscall.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
IllegalArgument
A syscall parameters was invalid.
IllegalOperation
The actor is not in the correct state to perform the requested operation.
LimitExceeded
This syscall would exceed some system limit (memory, lookback, call depth, etc.).
AssertionFailed
A system-level assertion has failed.
Note
Non-system actors should never receive this error number. A system-level assertion will cause the entire message to fail.
InsufficientFunds
There were insufficient funds to complete the requested operation.
NotFound
A resource was not found.
InvalidHandle
The specified IPLD block handle was invalid.
IllegalCid
The requested CID shape (multihash codec, multihash length) isn’t supported.
IllegalCodec
The requested IPLD codec isn’t supported.
Serialization
The IPLD block did not match the specified IPLD codec.
Forbidden
The operation is forbidden.
BufferTooSmall
The passed buffer is too small.
Trait Implementations
sourceimpl Clone for ErrorNumber
impl Clone for ErrorNumber
sourcefn clone(&self) -> ErrorNumber
fn clone(&self) -> ErrorNumber
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresourceimpl Debug for ErrorNumber
impl Debug for ErrorNumber
sourceimpl Display for ErrorNumber
impl Display for ErrorNumber
sourceimpl Error for ErrorNumber
impl Error for ErrorNumber
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
sourceimpl FromPrimitive for ErrorNumber
impl FromPrimitive for ErrorNumber
sourcefn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
i64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
u64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
isize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
i8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
i16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
i32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
i128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
usize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
u8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
u16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
u32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
u128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read more