note about enum derive and custom_error

This commit is contained in:
Harald Hoyer 2018-12-21 16:07:56 +01:00
parent bbc9c12164
commit 06819d8d8f

View file

@ -19,6 +19,11 @@ src/main.rs:40: func1 error calling func2
which gives us a lot more detail.
To create your own Errors, you might find [crates](https://crates.io) which crate enum `Display+Debug` via derive macros.
Also noteworthy is [custom_error](https://crates.io/crates/custom_error) to define your custom errors,
which can then be used with `chainerror`.
~~~rust
use crate::chainerror::*;
{{#include ../examples/tutorial11.rs:2:}}