pub enum ProgramError {
Show 20 variants
InvalidArgument,
InvalidInstructionData,
InvalidAccountData,
AccountDataTooSmall,
InsufficientFunds,
IncorrectProgramId,
MissingRequiredSignature,
AccountAlreadyInitialized,
UninitializedAccount,
MissingAccount,
InvalidSeeds,
ArithmeticOverflow,
AccountNotRentExempt,
InvalidAccountOwner,
IncorrectAuthority,
Immutable,
BorshIoError,
ComputeBudgetExceeded,
Custom(u32),
Runtime(String),
}Expand description
Errors returned by program execution in QuasarSVM.
Maps from the runtime’s InstructionError into a clean enum for
assertions in tests:
let result = svm.process_instruction(&ix, &accounts);
assert_eq!(result.error(), Some(ProgramError::InvalidAccountData));Variants§
InvalidArgument
The arguments provided were invalid.
InvalidInstructionData
The instruction data was invalid.
InvalidAccountData
The account data was invalid.
AccountDataTooSmall
Account data was too small.
InsufficientFunds
Insufficient lamports.
IncorrectProgramId
Wrong program id.
MissingRequiredSignature
A required signature was missing.
AccountAlreadyInitialized
Account was already initialized.
UninitializedAccount
Account was not initialized.
MissingAccount
An account required by the instruction is missing.
InvalidSeeds
Invalid PDA seeds.
ArithmeticOverflow
Arithmetic overflow.
AccountNotRentExempt
Account is not rent-exempt.
InvalidAccountOwner
Invalid account owner.
IncorrectAuthority
Incorrect authority.
Immutable
Account is immutable.
BorshIoError
Borsh serialization/deserialization failed.
ComputeBudgetExceeded
Computational budget exceeded.
Custom(u32)
Program-specific error code.
Runtime(String)
An InstructionError variant that doesn’t map to a common program
error. The string contains the debug representation.
Trait Implementations§
Source§impl Clone for ProgramError
impl Clone for ProgramError
Source§fn clone(&self) -> ProgramError
fn clone(&self) -> ProgramError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProgramError
impl Debug for ProgramError
Source§impl Display for ProgramError
impl Display for ProgramError
Source§impl From<InstructionError> for ProgramError
impl From<InstructionError> for ProgramError
Source§fn from(err: InstructionError) -> Self
fn from(err: InstructionError) -> Self
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more