use num_derive::FromPrimitive;
use thiserror::Error;
#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
pub enum UnoError {
#[error("User is not signer")]
UserIsNotSigner,
#[error("Nonce account not initialized")]
NonceNotInitialized,
#[error("Invalid nonce account")]
InvalidNonceAccount,
#[error("Nonce account is not writable")]
NonceNotWritable,
#[error("Math overflow")]
MathOverflow,
#[error("Invalid argument")]
InvalidArgument,
#[error("Invalid system program id")]
InvalidSystemProgramId,
}
impl solana_program::program_error::PrintProgramError for UnoError {
fn print<E>(&self) {
solana_program::msg!(&self.to_string());
}
}