Sigil documentation
ReferenceRust referencesigil-execution

sigil-execution · error

Source declarations, signatures and documentation for error.

Source: sigil/node/sigil-execution/src/error.rs. SHA-256: f083c447715aae66ac9effcc598d26399096e60c802f6ea3509fe955dac5a4b3.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

error::ExecutionError

Errors that can occur during WASM execution in an Organization Zone.

#[derive(Debug, Clone, thiserror::Error, Serialize, Deserialize)]
pub enum ExecutionError {
    /// Gas limit exceeded during execution.
    #[error("out of gas: used {used} of {limit}")]
    OutOfGas {
        /// Gas consumed before failure.
        used: u64,
        /// Gas limit for this execution.
        limit: u64,
    },

    /// WASM runtime trap (e.g., unreachable instruction, division by zero).
    #[error("WASM trap: {0}")]
    WasmTrap(String),

    /// Module failed validation or compilation.
    #[error("invalid module: {0}")]
    InvalidModule(String),

    /// Referenced zone does not exist.
    #[error("zone not found: {0}")]
    ZoneNotFound(String),

    /// Zone is suspended and cannot execute.
    #[error("zone suspended: {0}")]
    ZoneSuspended(String),

    /// Referenced module is not deployed in the zone.
    #[error("module not found: {0}")]
    ModuleNotFound(String),

    /// Error reading or writing zone state.
    #[error("state error: {0}")]
    StateError(String),

    /// Error during cross-zone message delivery.
    #[error("cross-zone error: {0}")]
    CrossZoneError(String),

    /// Caller lacks required permissions.
    #[error("permission denied: {0}")]
    PermissionDenied(String),

    /// WASM linear memory limit exceeded.
    #[error("memory limit exceeded: requested {requested} bytes, limit {limit} bytes")]
    MemoryLimitExceeded {
        /// Bytes requested.
        requested: u64,
        /// Maximum allowed bytes.
        limit: u64,
    },

    /// WASM call stack overflow.
    #[error("stack overflow")]
    StackOverflow,
}

Source line: 7.

On this page