mirror of
https://github.com/haraldh/chainerror.git
synced 2025-05-30 05:28:08 +02:00
lots of documentation
This commit is contained in:
parent
5145b950b5
commit
8ad6eaceac
24 changed files with 892 additions and 89 deletions
|
@ -1,6 +1,23 @@
|
|||
# Debug for the ErrorKind
|
||||
|
||||
[TBD]
|
||||
One small improvement at the end of the tutorial is to fix the debug output of
|
||||
`Func1ErrorKind`. As you probably noticed, the output doesn't say much of the enum.
|
||||
|
||||
~~~
|
||||
Debug Error:
|
||||
src/main.rs:35: Func2
|
||||
[…]
|
||||
~~~
|
||||
|
||||
As a lazy shortcut, we implement `Debug` by calling `Display` and end up with
|
||||
|
||||
~~~
|
||||
Debug Error:
|
||||
src/main.rs:40: func1 error calling func2
|
||||
[…}
|
||||
~~~
|
||||
|
||||
which gives us a lot more detail.
|
||||
|
||||
~~~rust
|
||||
use crate::chainerror::*;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue