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 upLinks and custom description / display #123
Comments
theduke
changed the title
Foreign links and custom description / display
Links and custom description / display
Feb 7, 2017
This comment has been minimized.
This comment has been minimized.
|
Upon investigation, you can get almost the described behaviour: error_chain! {
errors {
Io(e: io::Error) {
description(..)
display(..)
cause(&e)
from()
}
}
}The only thing missing is, this only gives a |
This comment has been minimized.
This comment has been minimized.
Arnavion
commented
Feb 7, 2017
•
|
Edit: Sorry, I misread that you switched to using custom links in your second post. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
theduke commentedFeb 7, 2017
•
edited
One thing I really dislike about
error_chaincompared toquick_erroris the inability to add a custom description and format to foreign_link errors (and regular links as well, actually).The docs suggest using
chain_err, but this looses the type information for the cause, which is not ideal, and you have to implementFrommanually.Any plans to add that functionality?