This commit is contained in:
Harald Hoyer 2018-12-20 15:14:21 +01:00
parent e0c2eadae0
commit 4d2d807332
13 changed files with 115 additions and 5 deletions

View file

@ -1,3 +1,13 @@
## Saving coding chars
Because decorating an error with more information should not
let you jump through hoops, `chainerror` has a quick macro for that.
`mstrerror!()` fits right into `.map_err()` letting you quickly add
more debug strings.
`mstrerror!()` even understands `format!()` syntax like `println!()`.
~~~rust
use crate::chainerror::*;
{{#include ../examples/tutorial4.rs:2:}}