lighthouse_sdk/generated/errors/
lighthouse.rs1use num_derive::FromPrimitive;
9use thiserror::Error;
10
11#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
12pub enum LighthouseError {
13 #[error("Invalid instruction")]
15 InvalidInstructionData,
16 #[error("AssertionFailed")]
18 AssertionFailed,
19 #[error("NotEnoughAccounts")]
21 NotEnoughAccounts,
22 #[error("BumpNotFound")]
24 BumpNotFound,
25 #[error("AccountBorrowFailed")]
27 AccountBorrowFailed,
28 #[error("RangeOutOfBounds")]
30 RangeOutOfBounds,
31 #[error("IndexOutOfBounds")]
33 IndexOutOfBounds,
34 #[error("FailedToDeserialize")]
36 FailedToDeserialize,
37 #[error("FailedToSerialize")]
39 FailedToSerialize,
40 #[error("AccountOwnerMismatch")]
42 AccountOwnerMismatch,
43 #[error("AccountKeyMismatch")]
45 AccountKeyMismatch,
46 #[error("AccountNotInitialized")]
48 AccountNotInitialized,
49 #[error("AccountOwnerValidationFailed")]
51 AccountOwnerValidationFailed,
52 #[error("AccountFundedValidationFailed")]
54 AccountFundedValidationFailed,
55 #[error("AccountDiscriminatorValidationFailed")]
57 AccountDiscriminatorValidationFailed,
58 #[error("AccountValidaitonFailed")]
60 AccountValidationFailed,
61 #[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}