solana_native_programs/system_program/generated/errors/
system_program.rs1use num_derive::FromPrimitive;
9use thiserror::Error;
10
11#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
12pub enum SystemProgramError {
13 #[error("an account with the same address already exists")]
15 AccountAlreadyInUse,
16 #[error("account does not have enough SOL to perform the operation")]
18 ResultWithNegativeLamports,
19 #[error("cannot assign account to this program id")]
21 InvalidProgramId,
22 #[error("cannot allocate account data of this length")]
24 InvalidAccountDataLength,
25 #[error("length of requested seed is too long")]
27 MaxSeedLengthExceeded,
28 #[error("provided address does not match addressed derived from seed")]
30 AddressWithSeedMismatch,
31 #[error("advancing stored nonce requires a populated RecentBlockhashes sysvar")]
33 NonceNoRecentBlockhashes,
34 #[error("stored nonce is still in recent_blockhashes")]
36 NonceBlockhashNotExpired,
37 #[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}