Enum solana_sdk::program_error::ProgramError[][src]

pub enum ProgramError {
    Custom(u32),
    InvalidArgument,
    InvalidInstructionData,
    InvalidAccountData,
    AccountDataTooSmall,
    InsufficientFunds,
    IncorrectProgramId,
    MissingRequiredSignature,
    AccountAlreadyInitialized,
    UninitializedAccount,
    NotEnoughAccountKeys,
    AccountBorrowFailed,
    MaxSeedLengthExceeded,
    InvalidSeeds,
    BorshIoError(String),
    AccountNotRentExempt,
}

Reasons the program may fail

Variants

Custom(u32)

Allows on-chain programs to implement program-specific error types and see them returned by the Solana runtime. A program-specific error may be any type that is represented as or serialized to a u32 integer.

InvalidArgument
InvalidInstructionData
InvalidAccountData
AccountDataTooSmall
InsufficientFunds
IncorrectProgramId
MissingRequiredSignature
AccountAlreadyInitialized
UninitializedAccount
NotEnoughAccountKeys
AccountBorrowFailed
MaxSeedLengthExceeded
InvalidSeeds
BorshIoError(String)
AccountNotRentExempt

Trait Implementations

impl Clone for ProgramError[src]

impl Debug for ProgramError[src]

impl<'de> Deserialize<'de> for ProgramError[src]

impl Display for ProgramError[src]

impl Eq for ProgramError[src]

impl Error for ProgramError[src]

impl From<Error> for ProgramError[src]

impl From<PubkeyError> for ProgramError[src]

impl From<u64> for ProgramError[src]

impl PartialEq<ProgramError> for ProgramError[src]

impl PrintProgramError for ProgramError[src]

impl Serialize for ProgramError[src]

impl StructuralEq for ProgramError[src]

impl StructuralPartialEq for ProgramError[src]

impl TryFrom<InstructionError> for ProgramError[src]

type Error = InstructionError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for ProgramError

impl Send for ProgramError

impl Sync for ProgramError

impl Unpin for ProgramError

impl UnwindSafe for ProgramError

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsErrorSource for T where
    T: 'static + Error
[src]

impl<T> AsFail for T where
    T: Fail
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<E> Fail for E where
    E: 'static + Error + Send + Sync
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeDebug for T where
    T: Debug
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]