Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd "Avoid discarding errors during error conversions" example #368
Conversation
ludwigpacifici
force-pushed the
ludwigpacifici:master
branch
from
22c417c
to
5df7c0b
Nov 15, 2017
This comment has been minimized.
This comment has been minimized.
budziq
requested changes
Nov 16, 2017
|
@ludwigpacifici some super minor suggestions below. |
src/basics.md
Outdated
| service will be queried via [reqwest] and then the response will be | ||
| parsed. Errors can be generated by the Rust standard library, | ||
| [reqwest] and by the web service. [`foreign_links`] are used for well | ||
| defined Rust errors. The `errors` macro is used to create an |
This comment has been minimized.
This comment has been minimized.
budziq
Nov 16, 2017
Collaborator
errors is actually not a macro but a clause inside a error_chain! macro
This comment has been minimized.
This comment has been minimized.
ludwigpacifici
Nov 16, 2017
•
Author
Contributor
Thanks for the clarification! I did not know that. Is it called a DSL?
This comment has been minimized.
This comment has been minimized.
budziq
Nov 17, 2017
Collaborator
Is it called a DSL?
Yep, the error-chain crate defines a DSL via its macros.
src/basics.md
Outdated
| fn main() { | ||
| if let Err(error) = run() { | ||
| match *error.kind() { | ||
| ErrorKind::Io(_) => println!("{:?}", error), |
This comment has been minimized.
This comment has been minimized.
budziq
Nov 16, 2017
Collaborator
We might want to differentiate the println!s here a little. 1-2 word preamble should be enough
ludwigpacifici
force-pushed the
ludwigpacifici:master
branch
from
5df7c0b
to
3f84f37
Nov 17, 2017
This comment has been minimized.
This comment has been minimized.
|
Thanks for the comments. I updated the PR. |
budziq
merged commit ba94df6
into
rust-lang-nursery:master
Nov 18, 2017
This comment has been minimized.
This comment has been minimized.
|
Nicely done! |
This comment has been minimized.
This comment has been minimized.
|
Thank you @budziq ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
ludwigpacifici commentedNov 15, 2017
fixes #215