mirror of
https://github.com/haraldh/chainerror.git
synced 2025-05-30 21:48:06 +02:00
rename cherr()
to context()
This commit is contained in:
parent
2af5fb7ad6
commit
ed710fada3
25 changed files with 169 additions and 199 deletions
|
@ -1,12 +1,7 @@
|
|||
# Saving coding chars
|
||||
# More information
|
||||
|
||||
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!()`.
|
||||
To give more context to the error, you want to use `format!`
|
||||
to extend the information in the context string.
|
||||
|
||||
~~~rust
|
||||
{{#include ../examples/tutorial4.rs}}
|
||||
|
@ -14,4 +9,4 @@ more debug strings.
|
|||
# mod chainerror {
|
||||
{{#rustdoc_include ../src/lib.rs:-1}}
|
||||
# }
|
||||
~~~
|
||||
~~~
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue