lighthouse_sdk/generated/errors/
lighthouse.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 LighthouseError {
13    /// 6000 (0x1770) - Invalid instruction
14    #[error("Invalid instruction")]
15    InvalidInstructionData,
16    /// 6001 (0x1771) - AssertionFailed
17    #[error("AssertionFailed")]
18    AssertionFailed,
19    /// 6002 (0x1772) - NotEnoughAccounts
20    #[error("NotEnoughAccounts")]
21    NotEnoughAccounts,
22    /// 6003 (0x1773) - BumpNotFound
23    #[error("BumpNotFound")]
24    BumpNotFound,
25    /// 6004 (0x1774) - AccountBorrowFailed
26    #[error("AccountBorrowFailed")]
27    AccountBorrowFailed,
28    /// 6005 (0x1775) - RangeOutOfBounds
29    #[error("RangeOutOfBounds")]
30    RangeOutOfBounds,
31    /// 6006 (0x1776) - IndexOutOfBounds
32    #[error("IndexOutOfBounds")]
33    IndexOutOfBounds,
34    /// 6007 (0x1777) - FailedToDeserialize
35    #[error("FailedToDeserialize")]
36    FailedToDeserialize,
37    /// 6008 (0x1778) - FailedToSerialize
38    #[error("FailedToSerialize")]
39    FailedToSerialize,
40    /// 6009 (0x1779) - AccountOwnerMismatch
41    #[error("AccountOwnerMismatch")]
42    AccountOwnerMismatch,
43    /// 6010 (0x177A) - AccountKeyMismatch
44    #[error("AccountKeyMismatch")]
45    AccountKeyMismatch,
46    /// 6011 (0x177B) - AccountNotInitialized
47    #[error("AccountNotInitialized")]
48    AccountNotInitialized,
49    /// 6012 (0x177C) - AccountOwnerValidationFailed
50    #[error("AccountOwnerValidationFailed")]
51    AccountOwnerValidationFailed,
52    /// 6013 (0x177D) - AccountFundedValidationFailed
53    #[error("AccountFundedValidationFailed")]
54    AccountFundedValidationFailed,
55    /// 6014 (0x177E) - AccountDiscriminatorValidationFailed
56    #[error("AccountDiscriminatorValidationFailed")]
57    AccountDiscriminatorValidationFailed,
58    /// 6015 (0x177F) - AccountValidaitonFailed
59    #[error("AccountValidaitonFailed")]
60    AccountValidationFailed,
61    /// 6016 (0x1780) - CrossProgramInvokeViolation
62    #[error("CrossProgramInvokeViolation")]
63    CrossProgramInvokeViolation,
64}
65
66impl solana_program::program_error::PrintProgramError for LighthouseError {
67    fn print<E>(&self) {
68        solana_program::msg!(&self.to_string());
69    }
70}