solana_program/
lamports.rsuse {crate::instruction::InstructionError, thiserror::Error};
#[derive(Debug, Error)]
pub enum LamportsError {
#[error("Arithmetic underflowed")]
ArithmeticUnderflow,
#[error("Arithmetic overflowed")]
ArithmeticOverflow,
}
impl From<LamportsError> for InstructionError {
fn from(error: LamportsError) -> Self {
match error {
LamportsError::ArithmeticOverflow => InstructionError::ArithmeticOverflow,
LamportsError::ArithmeticUnderflow => InstructionError::ArithmeticOverflow,
}
}
}