Open christophermaier opened 5 years ago
Might not want to use failure
after all, based on https://users.rust-lang.org/t/the-state-of-error-handling-in-the-2018-edition/23263/26
If we could find a better way to deal with error context, at least for our I/O errors, that would be nice; that was really the most exciting thing about failure
for me, anyway.
https://github.com/dtolnay/thiserror and https://github.com/dtolnay/anyhow are interesting new crates in this area to check out.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.
This issue has been automatically closed after being stale for 400 days. We still value your input and contribution. Please re-open the issue if desired and leave a comment with details.
The failure crate (documentation here) provides a more modern approach to Rust error handling than the
std::error::Error
trait, while remaining backward compatible with it.It has a lot of nice features, including lots of automatic trait derivation to reduce boilerplate, cause chaining, backtrace support, and context (which would be a huge win for making all the IO errors we can throw more intelligible).
We should dig into this crate to help improve our error handling story.