sigil_client/generated/errors/
sigil.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 SigilError {
13    /// 0 (0x0) - Error deserializing an account
14    #[error("Error deserializing an account")]
15    DeserializationError,
16    /// 1 (0x1) - Error serializing an account
17    #[error("Error serializing an account")]
18    SerializationError,
19    /// 2 (0x2) - Invalid program owner. This likely mean the provided account does not exist
20    #[error("Invalid program owner. This likely mean the provided account does not exist")]
21    InvalidProgramOwner,
22    /// 3 (0x3) - Invalid PDA derivation
23    #[error("Invalid PDA derivation")]
24    InvalidPda,
25    /// 4 (0x4) - Expected empty account
26    #[error("Expected empty account")]
27    ExpectedEmptyAccount,
28    /// 5 (0x5) - Expected non empty account
29    #[error("Expected non empty account")]
30    ExpectedNonEmptyAccount,
31    /// 6 (0x6) - Expected signer account
32    #[error("Expected signer account")]
33    ExpectedSignerAccount,
34    /// 7 (0x7) - Expected writable account
35    #[error("Expected writable account")]
36    ExpectedWritableAccount,
37    /// 8 (0x8) - Account mismatch
38    #[error("Account mismatch")]
39    AccountMismatch,
40    /// 9 (0x9) - Invalid account key
41    #[error("Invalid account key")]
42    InvalidAccountKey,
43    /// 10 (0xA) - Numerical overflow
44    #[error("Numerical overflow")]
45    NumericalOverflow,
46    /// 11 (0xB) - Invalid utf8 ticker
47    #[error("Invalid utf8 ticker")]
48    InvalidTicker,
49    /// 12 (0xC) - Invalid mint
50    #[error("Invalid mint")]
51    InvalidMint,
52    /// 13 (0xD) - Invalid token account
53    #[error("Invalid token account")]
54    InvalidTokenAccount,
55    /// 14 (0xE) - Insufficient funds
56    #[error("Insufficient funds")]
57    InsufficientFunds,
58    /// 15 (0xF) - Maximum supply reached
59    #[error("Maximum supply reached")]
60    MaximumSupplyReached,
61    /// 16 (0x10) - Cannot close mint account with supply
62    #[error("Cannot close mint account with supply")]
63    MintHasSupply,
64}
65
66impl solana_program::program_error::PrintProgramError for SigilError {
67    fn print<E>(&self) {
68        solana_program::msg!(&self.to_string());
69    }
70}