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
ARITHMETIC_OVERFLOW
BORSH_IO_ERROR
BUILTIN_BIT_SHIFT
Builtin return values occupy the upper 32 bits
BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS
CUSTOM_ZERO
EXECUTABLE_LAMPORT_CHANGE
FROM_HEX_ERROR
ILLEGAL_OWNER
IMMUTABLE
INCORRECT_AUTHORITY
INCORRECT_PROGRAM_ID
INSUFFICIENT_FUNDS
INVALID_ACCOUNT_DATA
INVALID_ACCOUNT_DATA_REALLOC
INVALID_ACCOUNT_OWNER
INVALID_ARGUMENT
INVALID_INSTRUCTION_DATA
INVALID_SEEDS
MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED
MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED
MAX_SEED_LENGTH_EXCEEDED
MISSING_REQUIRED_SIGNATURES
NEGATIVE_ACCOUNT_LAMPORTS
NOT_ENOUGH_ACCOUNT_KEYS
READONLY_LAMPORT_CHANGE
UNINITIALIZED_ACCOUNT
UNSUPPORTED_SYSVAR

Traits§

PrintProgramError