mirror of
https://github.com/rust-lang-nursery/rust-cookbook
synced 2025-02-17 04:38:28 +00:00
Error chain description to match the code
This commit is contained in:
parent
e728582e73
commit
286c7d007f
1 changed files with 4 additions and 4 deletions
|
@ -71,10 +71,10 @@ fn main() {
|
|||
}
|
||||
```
|
||||
|
||||
This is using the `error_chain!` macro to define a custom `Error`
|
||||
and `Result` type, along with an automatic conversion from
|
||||
the common `::std::io::Error` type. The automatic conversion
|
||||
makes the `?` operator work .
|
||||
This is using the `error_chain!` macro to define a custom `Error` and
|
||||
`Result` type, along with an automatic conversion from two standard
|
||||
library error types. The automatic conversion makes the `?` operator
|
||||
work.
|
||||
|
||||
For more background on error handling in Rust, read [this page of the
|
||||
Rust book][error-docs] and [this blog post][error-blog].
|
||||
|
|
Loading…
Add table
Reference in a new issue