Enum fvm_shared::error::ExitCode
source · [−]#[repr(u32)]
pub enum ExitCode {
Show 24 variants
Ok,
SysErrSenderInvalid,
SysErrSenderStateInvalid,
SysErrInvalidMethod,
SysErrActorPanic,
SysErrInvalidReceiver,
SysErrInsufficientFunds,
SysErrOutOfGas,
SysErrForbidden,
SysErrIllegalActor,
SysErrIllegalArgument,
SysErrReserved2,
SysErrReserved3,
SysErrReserved4,
SysErrReserved5,
SysErrReserved6,
ErrIllegalArgument,
ErrNotFound,
ErrForbidden,
ErrInsufficientFunds,
ErrIllegalState,
ErrSerialization,
ErrTooManyProveCommits,
ErrPlaceholder,
}Expand description
ExitCode defines the exit code from the VM execution.
Variants
Ok
SysErrSenderInvalid
Indicates failure to find an actor in the state tree.
SysErrSenderStateInvalid
Indicates that the message sender was not in a valid state to send this message.
Either:
- The sender’s nonce nonce didn’t match the message nonce.
- The sender didn’t have the funds to cover the message gas.
SysErrInvalidMethod
Indicates failure to find a method in an actor.
SysErrActorPanic
Used for catching panics currently.
SysErrInvalidReceiver
Indicates that the receiver of a message is not valid (and cannot be implicitly created).
SysErrInsufficientFunds
Indicates a message sender has insufficient funds for a message’s execution.
SysErrOutOfGas
Indicates message execution (including subcalls) used more gas than the specified limit.
SysErrForbidden
Indicates a message execution is forbidden for the caller.
SysErrIllegalActor
Indicates actor code performed a disallowed operation. Disallowed operations include:
- mutating state outside of a state acquisition block
- failing to invoke caller validation
- aborting with a reserved exit code (including success or a system error).
SysErrIllegalArgument
Indicates an invalid argument passed to a runtime method.
SysErrReserved2
Reserved exit codes, do not use.
SysErrReserved3
SysErrReserved4
SysErrReserved5
SysErrReserved6
ErrIllegalArgument
Indicates a method parameter is invalid.
ErrNotFound
Indicates a requested resource does not exist.
ErrForbidden
Indicates an action is disallowed.
ErrInsufficientFunds
Indicates a balance of funds is insufficient.
ErrIllegalState
Indicates an actor’s internal state is invalid.
ErrSerialization
Indicates de/serialization failure within actor code.
ErrTooManyProveCommits
Power actor specific exit code.
ErrPlaceholder
Implementations
sourceimpl ExitCode
impl ExitCode
sourcepub fn is_success(self) -> bool
pub fn is_success(self) -> bool
Returns true if the exit code was a success
sourcepub fn is_system_error(self) -> bool
pub fn is_system_error(self) -> bool
Returns true if the error code is a system error.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for ExitCode
impl<'de> Deserialize<'de> for ExitCode
sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Error for ExitCode
impl Error for ExitCode
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl FromPrimitive for ExitCode
impl FromPrimitive for ExitCode
sourcefn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
Converts an i64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read more
sourcefn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
Converts an u64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read more
sourcefn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
Converts an isize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read more
sourcefn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
Converts an i8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read more
sourcefn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
Converts an i16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read more
sourcefn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
Converts an i32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read more
sourcefn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
Converts an i128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read more
sourcefn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
Converts a usize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read more
sourcefn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
Converts an u8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read more
sourcefn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
Converts an u16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read more
sourcefn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
Converts an u32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read more
sourcefn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
Converts an u128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read more
impl Copy for ExitCode
impl Eq for ExitCode
impl StructuralEq for ExitCode
impl StructuralPartialEq for ExitCode
Auto Trait Implementations
impl RefUnwindSafe for ExitCode
impl Send for ExitCode
impl Sync for ExitCode
impl Unpin for ExitCode
impl UnwindSafe for ExitCode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more