mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-03-21 06:36:31 +02:00
anyhow
: say this example has fewer custom types
This commit is contained in:
parent
894e694cdb
commit
5ce7a08f0e
@ -1,7 +1,8 @@
|
|||||||
# Adding Context to Errors
|
# Adding Context to Errors
|
||||||
|
|
||||||
The widely used [anyhow](https://docs.rs/anyhow/) crate can help you add
|
The widely used [anyhow](https://docs.rs/anyhow/) crate can help you add
|
||||||
contextual information to your errors:
|
contextual information to your errors and allows you to have fewer
|
||||||
|
custom error types:
|
||||||
|
|
||||||
```rust,editable,compile_fail
|
```rust,editable,compile_fail
|
||||||
use std::{fs, io};
|
use std::{fs, io};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user