failure
The failure crate is an error-handling library
API
Fail
-
The Fail trait extends errors with a variety of traits and methods.
use failure_derive::Fail; #[derive(Fail)] enum CustomErr { #[fail(display="Foo error")] CustomErrorFoo(String), #[fail(display="Bar error")] CustomErrorBar(String), }