mirror of
https://github.com/haraldh/chainerror.git
synced 2025-01-30 16:46:42 +01:00
note about enum derive and custom_error
This commit is contained in:
parent
bbc9c12164
commit
06819d8d8f
|
@ -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:}}
|
||||
|
|
Loading…
Reference in a new issue