chainerror/booksrc/tutorial4.md

13 lines
264 B
Markdown
Raw Permalink Normal View History

2020-09-01 21:03:01 +02:00
# More information
2018-12-20 15:14:21 +01:00
2020-09-01 21:03:01 +02:00
To give more context to the error, you want to use `format!`
to extend the information in the context string.
2018-12-20 15:14:21 +01:00
2018-12-20 14:52:06 +01:00
~~~rust
2019-03-04 11:38:35 +01:00
{{#include ../examples/tutorial4.rs}}
2018-12-20 14:52:06 +01:00
# #[allow(dead_code)]
# mod chainerror {
2020-03-03 14:25:37 +01:00
{{#rustdoc_include ../src/lib.rs:-1}}
2018-12-20 14:52:06 +01:00
# }
2020-09-01 21:03:01 +02:00
~~~