solana_native_programs/system_program/generated/errors/
system_program.rs

1//! This code was AUTOGENERATED using the kinobi library.
2//! Please DO NOT EDIT THIS FILE, instead use visitors
3//! to add features, then rerun kinobi to update it.
4//!
5//! [https://github.com/metaplex-foundation/kinobi]
6//!
7
8use num_derive::FromPrimitive;
9use thiserror::Error;
10
11#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
12pub enum SystemProgramError {
13    /// 0 (0x0) - an account with the same address already exists
14    #[error("an account with the same address already exists")]
15    AccountAlreadyInUse,
16    /// 1 (0x1) - account does not have enough SOL to perform the operation
17    #[error("account does not have enough SOL to perform the operation")]
18    ResultWithNegativeLamports,
19    /// 2 (0x2) - cannot assign account to this program id
20    #[error("cannot assign account to this program id")]
21    InvalidProgramId,
22    /// 3 (0x3) - cannot allocate account data of this length
23    #[error("cannot allocate account data of this length")]
24    InvalidAccountDataLength,
25    /// 4 (0x4) - length of requested seed is too long
26    #[error("length of requested seed is too long")]
27    MaxSeedLengthExceeded,
28    /// 5 (0x5) - provided address does not match addressed derived from seed
29    #[error("provided address does not match addressed derived from seed")]
30    AddressWithSeedMismatch,
31    /// 6 (0x6) - advancing stored nonce requires a populated RecentBlockhashes sysvar
32    #[error("advancing stored nonce requires a populated RecentBlockhashes sysvar")]
33    NonceNoRecentBlockhashes,
34    /// 7 (0x7) - stored nonce is still in recent_blockhashes
35    #[error("stored nonce is still in recent_blockhashes")]
36    NonceBlockhashNotExpired,
37    /// 8 (0x8) - specified nonce does not match stored nonce
38    #[error("specified nonce does not match stored nonce")]
39    NonceUnexpectedBlockhashValue,
40}
41
42impl solana_program::program_error::PrintProgramError for SystemProgramError {
43    fn print<E>(&self) {
44        solana_program::msg!(&self.to_string());
45    }
46}