use std::{error::Error, fmt};
#[derive(Debug, Eq, PartialEq, Clone, PartialOrd, Ord, Hash, Default)]
pub struct ParamError {
pub message: String,
}
impl ParamError {
pub fn new(message: String) -> Self {
Self { message }
}
}
impl Error for ParamError {}
impl fmt::Display for ParamError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "Parameter error: {}", &self.message)
}
}