Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

Use the failure crate for error handling #287

Closed
thomaseizinger opened this issue Sep 19, 2018 · 2 comments
Closed

Use the failure crate for error handling #287

thomaseizinger opened this issue Sep 19, 2018 · 2 comments

Comments

@thomaseizinger
Copy link
Contributor

https://boats.gitlab.io/failure/intro.html

This is a nice refactoring task that can hopefully be done incrementally. In a nutshell, it allows you to always use the same Error type as a return value (failure::Error) as long as all your custom errors implement failure::Fail. This should get rid of all your From implementations of the errors.

@LLFourn
Copy link
Collaborator

LLFourn commented Dec 8, 2018

@thomaseizinger we kind of do this already. I'm still not 100% confident on when to use it but maybe this can be closed?

@D4nte
Copy link
Contributor

D4nte commented Feb 3, 2019

Deprecated:

Heads up, failure crate users, especially library authors! The failure crate is starting to fall by the wayside, since std::error::Error is being fixed to provide the same benefits of failure::Fail, so its usage is being increasingly discouraged in the Rust ecosystem. See this issue for details: rust-lang/rust#53487

@D4nte D4nte closed this as completed Feb 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants