Skip to main content

Module program_error

Module program_error 

Source
Expand description

Error types for program operations Error types and handling for Arch VM programs.

This module defines the standard error types that can be returned by programs running in the Arch VM environment. It provides a uniform way to represent, decode, and display program errors, allowing for consistent error handling across the platform.

The error system is designed to be compatible with program-specific custom errors while also providing a set of standard error types for common failure scenarios.

Enums§

ProgramError
Reasons the program may fail

Constants§

ACCOUNT_ALREADY_INITIALIZED
ACCOUNT_BORROW_FAILED
ACCOUNT_DATA_TOO_SMALL
ACCOUNT_NOT_ANCHORED
ACCOUNT_NOT_RENT_EXEMPT
ACCOUNT_UTXO_MODIFIED
ARITHMETIC_OVERFLOW
BORSH_IO_ERROR
BUILTIN_BIT_SHIFT
Builtin return values occupy the upper 32 bits
BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS
CUSTOM_ZERO
DUPLICATE_SHARD_ACCOUNTS
EXECUTABLE_LAMPORT_CHANGE
FROM_HEX_ERROR
ILLEGAL_OWNER
IMMUTABLE
INCORRECT_AUTHORITY
INCORRECT_LENGTH
INCORRECT_PROGRAM_ID
INSUFFICIENT_DATA_LENGTH
INSUFFICIENT_FUNDS
INVALID_ACCOUNT_DATA
INVALID_ACCOUNT_DATA_REALLOC
INVALID_ACCOUNT_OWNER
INVALID_AGGREGATE_SIZE
INVALID_ARGUMENT
INVALID_CHUNK
INVALID_INSTRUCTION_DATA
INVALID_SEEDS
INVALID_STATE_TRANSITION
INVALID_UTXO_ID
INVALID_UTXO_SIGNER
MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED
MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED
MAX_SEEDS_EXCEEDED
MAX_SEED_LENGTH_EXCEEDED
MISSING_REQUIRED_SIGNATURES
NEGATIVE_ACCOUNT_LAMPORTS
NOT_ENOUGH_ACCOUNT_KEYS
NOT_ENOUGH_COMPUTE_UNITS
READONLY_LAMPORT_CHANGE
TRANSACTION_TO_SIGN_EMPTY
TRANSCRIPT_VERIFICATION_FAILED
UNINITIALIZED_ACCOUNT
UNSUPPORTED_SYSVAR

Traits§

PrintProgramError