mpl_engraver/generated/errors/
mpl_engraver.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 MplEngraverError {
13    /// 0 (0x0) - Invalid Instruction
14    #[error("Invalid Instruction")]
15    InvalidInstruction,
16    /// 1 (0x1) - Invalid Account owner
17    #[error("Invalid Account owner")]
18    InvalidAccountOwner,
19    /// 2 (0x2) - The mint does not match the metadata account
20    #[error("The mint does not match the metadata account")]
21    MintMetadataMismatch,
22    /// 3 (0x3) - The mint does not match the token account
23    #[error("The mint does not match the token account")]
24    MintTokenMismatch,
25    /// 4 (0x4) - The edition supply is not zero
26    #[error("The edition supply is not zero")]
27    EditionSupplyMismatch,
28    /// 5 (0x5) - The derived PDA is not valid
29    #[error("The derived PDA is not valid")]
30    DerivedKeyInvalid,
31}
32
33impl solana_program::program_error::PrintProgramError for MplEngraverError {
34    fn print<E>(&self) {
35        solana_program::msg!(&self.to_string());
36    }
37}