#[derive(Throwable)]
{
// Attributes available to this derive:
#[throwable]
#[throwable_class]
}
Expand description
Auto derive for phper::errors::Throwable
.
Examples
#[derive(thiserror::Error, phper::Throwable, Debug)]
#[throwable_class("Exception")]
pub enum Error {
#[error(transparent)]
Io(#[from] std::io::Error),
#[error(transparent)]
#[throwable(transparent)]
My(#[from] MyError),
}
TODO Support attribute throwable
with class
, code
and message
,
integration tests.