use std::fmt;
#[derive(Debug)]
pub enum AethelError {
PoolNotFound { section: String, field: String },
MissingDependency(String),
Custom(String),
}
impl fmt::Display for AethelError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
AethelError::PoolNotFound { section, field } => {
write!(f, "pool not found for section '{section}', field '{field}'")
}
AethelError::MissingDependency(key) => {
write!(f, "missing dependency in generation context: '{key}'")
}
AethelError::Custom(msg) => write!(f, "{msg}"),
}
}
}
impl std::error::Error for AethelError {}