Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider Migrating to Failure crate #290

Closed
stephanbuys opened this issue Dec 7, 2017 · 5 comments
Closed

Consider Migrating to Failure crate #290

stephanbuys opened this issue Dec 7, 2017 · 5 comments
Milestone

Comments

@stephanbuys
Copy link
Contributor

I had an opportunity to play with the failure crate a couple of weeks ago and was thoroughly impressed. I believe it would be a worthwhile exercise pre 1.x to migrate to it.

@KodrAus
Copy link
Member

KodrAus commented Dec 7, 2017

I absolutely agree 👍 thanks for bringing this up! Instead of attempting to translate errors from one type to another we can just wrap them with Contexts and reduce a lot of boilerplate and leaking of error variants.

@KodrAus KodrAus added this to the Future milestone Dec 8, 2017
@KodrAus
Copy link
Member

KodrAus commented Dec 10, 2017

This would also be a bit nicer for adding the correlation id to errors coming out of the Sender machinery and getting the Send + Sync bounds consistent. Overall it should be a big win.

@mwilliammyers
Copy link
Collaborator

I am fairly new to Rust and the whole ecosystem, but it seems like there is somewhat of a debate about the future of failure especially considering that fixing std::error::Error has recently seen some new momentum (it looks like).

Should we just use the downcasting support that just landed in 1.33 or go forward with Failure?

In the meantime, I opened #340 and will continue to improve errors as I run into them.

@KodrAus
Copy link
Member

KodrAus commented Mar 10, 2019

@mwilliammyers Yeh the state of the world is a little different now. failure is still a nice library for error management in applications (where you can easily #derive(Fail)]), but some of the holes in std::error::Error for libraries have been filled.

Sticking with std::error::Error for now seems ok. And thanks for working on improving the API errors!

@KodrAus
Copy link
Member

KodrAus commented Mar 19, 2019

We now use the new error::Error APIs for properly downcastable errors so I'll go ahead and close this one. We can open new issues for other deficiencies with the errors.

@KodrAus KodrAus closed this as completed Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants