error.rs 544 B

123456789101112131415161718192021
  1. use steel::*;
  2. use thiserror::Error;
  3. /// Custom error types for the address info program
  4. #[repr(u32)]
  5. #[derive(Debug, Error, Clone, Copy, PartialEq, Eq, IntoPrimitive)]
  6. pub enum AddressInfoError {
  7. #[error("Required account is missing")]
  8. MissingRequiredAccount = 0,
  9. #[error("Account owner is invalid")]
  10. InvalidAccountOwner = 1,
  11. #[error("Invalid instruction data")]
  12. InvalidInstructionData = 2,
  13. #[error("Address info account already exists")]
  14. AddressInfoAccountAlreadyExists = 3,
  15. }
  16. error!(AddressInfoError);