pub enum ProgramError {
Show 20 variants
Custom(u32),
InvalidArgument,
InvalidInstructionData,
InvalidAccountData,
AccountDataTooSmall,
InsufficientFunds,
IncorrectProgramId,
MissingRequiredSignature,
AccountAlreadyInitialized,
UninitializedAccount,
NotEnoughAccountKeys,
AccountBorrowFailed,
MaxSeedLengthExceeded,
InvalidSeeds,
BorshIoError,
AccountNotRentExempt,
UnsupportedSysvar,
IllegalOwner,
MaxAccountsDataSizeExceeded,
InvalidReentrancy,
}Expand description
Reasons the program may fail
Variants§
Custom(u32)
Custom program error
InvalidArgument
Invalid argument provided
InvalidInstructionData
Invalid instruction data
InvalidAccountData
Invalid account data
AccountDataTooSmall
Account data too small
InsufficientFunds
Insufficient funds
IncorrectProgramId
Incorrect program id
MissingRequiredSignature
Missing required signature
AccountAlreadyInitialized
Account already initialized
UninitializedAccount
Uninitialized account
NotEnoughAccountKeys
Not enough account keys
AccountBorrowFailed
Account borrow failed
MaxSeedLengthExceeded
Max seed length exceeded
InvalidSeeds
Invalid seeds
BorshIoError
Borsh IO error
AccountNotRentExempt
Account not rent exempt
UnsupportedSysvar
Unsupported sysvar
IllegalOwner
Illegal owner
MaxAccountsDataSizeExceeded
Max accounts data size exceeded
InvalidReentrancy
Invalid reentrancy
Implementations§
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<u64> for ProgramError
impl From<u64> for ProgramError
Source§impl PartialEq for ProgramError
impl PartialEq for ProgramError
impl Copy 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 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