use std::{
error::Error,
fmt::{self, Display, Formatter},
};
#[derive(Debug)]
pub enum BondingCurveError {
Overflow,
DivisionByZero,
}
impl Display for BondingCurveError {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
match self {
BondingCurveError::Overflow => {
write!(f, "An overflow occurred during the operation.")
}
BondingCurveError::DivisionByZero => {
write!(f, "A division by zero occurred during the operation.")
}
}
}
}
impl Error for BondingCurveError {}