use std::fmt;
#[derive(Debug)]
pub enum Error {
BadRef(String),
BadNesting(String)
}
impl std::error::Error for Error {}
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
Self::BadRef(s) => write!(f, "Bad reference error; {s}"),
Self::BadNesting(s) => write!(f, "Bad nesting error; {s}")
}
}
}