#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
pub enum Error {
#[error("{0}")]
InvalidArgument(String),
#[error("{0}")]
Exception(String),
}
impl Error {
pub fn php_class(&self) -> &'static str {
match self {
Error::InvalidArgument(_) => "InvalidArgumentException",
Error::Exception(_) => "Exception",
}
}
}