use std::fmt;
#[derive(Debug)]
pub struct ConfigError {
message: String,
}
impl ConfigError {
pub fn new(msg: impl Into<String>) -> Self {
ConfigError {
message: msg.into(),
}
}
}
impl fmt::Display for ConfigError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "Configuration error: {}", self.message)
}
}
impl std::error::Error for ConfigError {}