pub enum ProgramError {
Show 26 variants
Custom(u32),
InvalidArgument,
InvalidInstructionData,
InvalidAccountData,
AccountDataTooSmall,
InsufficientFunds,
IncorrectProgramId,
MissingRequiredSignature,
AccountAlreadyInitialized,
UninitializedAccount,
NotEnoughAccountKeys,
AccountBorrowFailed,
MaxSeedLengthExceeded,
InvalidSeeds,
BorshIoError,
AccountNotRentExempt,
UnsupportedSysvar,
IllegalOwner,
MaxAccountsDataAllocationsExceeded,
InvalidRealloc,
MaxInstructionTraceLengthExceeded,
BuiltinProgramsMustConsumeComputeUnits,
InvalidAccountOwner,
ArithmeticOverflow,
Immutable,
IncorrectAuthority,
}Expand description
Errors that a Solana program can return.
This is part of the Hopper runtime type surface. Variant discriminants match the Solana runtime ABI.
Variants§
Custom(u32)
Custom program error with a u32 code.
InvalidArgument
InvalidInstructionData
InvalidAccountData
AccountDataTooSmall
InsufficientFunds
IncorrectProgramId
MissingRequiredSignature
AccountAlreadyInitialized
UninitializedAccount
NotEnoughAccountKeys
AccountBorrowFailed
MaxSeedLengthExceeded
InvalidSeeds
BorshIoError
AccountNotRentExempt
UnsupportedSysvar
IllegalOwner
MaxAccountsDataAllocationsExceeded
InvalidRealloc
MaxInstructionTraceLengthExceeded
BuiltinProgramsMustConsumeComputeUnits
InvalidAccountOwner
ArithmeticOverflow
Immutable
IncorrectAuthority
Implementations§
Source§impl ProgramError
impl ProgramError
pub fn err_data_too_small<T>() -> Result<T, ProgramError>
pub fn err_invalid_data<T>() -> Result<T, ProgramError>
pub fn err_missing_signer<T>() -> Result<T, ProgramError>
pub fn err_immutable<T>() -> Result<T, ProgramError>
pub fn err_not_enough_keys<T>() -> Result<T, ProgramError>
pub fn err_borrow_failed<T>() -> Result<T, ProgramError>
pub fn err_overflow<T>() -> Result<T, ProgramError>
pub fn err_invalid_argument<T>() -> Result<T, ProgramError>
pub fn err_incorrect_program<T>() -> Result<T, ProgramError>
Trait Implementations§
Source§impl Clone for ProgramError
impl Clone for ProgramError
Source§fn clone(&self) -> ProgramError
fn clone(&self) -> ProgramError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProgramError
impl Debug for ProgramError
Source§impl Display for ProgramError
impl Display for ProgramError
Source§impl From<ProgramError> for ProgramError
impl From<ProgramError> for ProgramError
Source§fn from(error: ProgramError) -> ProgramError
fn from(error: ProgramError) -> ProgramError
Converts to this type from the input type.
Source§impl From<RemainingError> for ProgramError
impl From<RemainingError> for ProgramError
Source§fn from(e: RemainingError) -> ProgramError
fn from(e: RemainingError) -> ProgramError
Converts to this type from the input type.
Source§impl From<u64> for ProgramError
impl From<u64> for ProgramError
Source§fn from(code: u64) -> ProgramError
fn from(code: u64) -> ProgramError
Converts to this type from the input type.
Source§impl PartialEq for ProgramError
impl PartialEq for ProgramError
impl Eq for ProgramError
impl StructuralPartialEq for ProgramError
Auto Trait Implementations§
impl Freeze for ProgramError
impl RefUnwindSafe for ProgramError
impl Send for ProgramError
impl Sync for ProgramError
impl Unpin for ProgramError
impl UnsafeUnpin for ProgramError
impl UnwindSafe for ProgramError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more