//! This code was AUTOGENERATED using the codama library.
//! Please DO NOT EDIT THIS FILE, instead use visitors
//! to add features, then rerun codama to update it.
//!
//! <https://github.com/codama-idl/codama>
//!

use num_derive::FromPrimitive;
use thiserror::Error;

#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
pub enum SpherenetMonetaryPolicyProgramError {
    /// 0 - No pending authority exists
    #[error("No pending authority exists")]
    NoPendingAuthority = 0x0,
    /// 1 - Invalid parameter value provided
    #[error("Invalid parameter value provided")]
    InvalidParameter = 0x1,
}

impl From<SpherenetMonetaryPolicyProgramError> for solana_program_error::ProgramError {
    fn from(e: SpherenetMonetaryPolicyProgramError) -> Self {
        solana_program_error::ProgramError::Custom(e as u32)
    }
}
