solana_system_client/generated/errors/
system.rs1use num_derive::FromPrimitive;
9use thiserror::Error;
10
11#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
12pub enum SystemError {
13 #[error("an account with the same address already exists")]
15 AccountAlreadyInUse = 0x0,
16 #[error("account does not have enough SOL to perform the operation")]
18 ResultWithNegativeLamports = 0x1,
19 #[error("cannot assign account to this program id")]
21 InvalidProgramId = 0x2,
22 #[error("cannot allocate account data of this length")]
24 InvalidAccountDataLength = 0x3,
25 #[error("length of requested seed is too long")]
27 MaxSeedLengthExceeded = 0x4,
28 #[error("provided address does not match addressed derived from seed")]
30 AddressWithSeedMismatch = 0x5,
31 #[error("advancing stored nonce requires a populated RecentBlockhashes sysvar")]
33 NonceNoRecentBlockhashes = 0x6,
34 #[error("stored nonce is still in recent_blockhashes")]
36 NonceBlockhashNotExpired = 0x7,
37 #[error("specified nonce does not match stored nonce")]
39 NonceUnexpectedBlockhashValue = 0x8,
40}
41
42impl solana_program::program_error::PrintProgramError for SystemError {
43 fn print<E>(&self) {
44 solana_program::msg!(&self.to_string());
45 }
46}