uno_sdk/generated/errors/
uno.rs1use num_derive::FromPrimitive;
9use thiserror::Error;
10
11#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
12pub enum UnoError {
13 #[error("User is not signer")]
15 UserIsNotSigner,
16 #[error("Nonce account not initialized")]
18 NonceNotInitialized,
19 #[error("Invalid nonce account")]
21 InvalidNonceAccount,
22 #[error("Nonce account is not writable")]
24 NonceNotWritable,
25 #[error("Math overflow")]
27 MathOverflow,
28 #[error("Invalid argument")]
30 InvalidArgument,
31 #[error("Invalid system program id")]
33 InvalidSystemProgramId,
34 #[error("Nonce account already exists")]
36 NonceAccountAlreadyExists,
37}
38
39impl solana_program::program_error::PrintProgramError for UnoError {
40 fn print<E>(&self) {
41 solana_program::msg!(&self.to_string());
42 }
43}