Custom Errors Are Non-Negotiable in My Rust Applications(tristonarmstrong.com)
tristonarmstrong.com
Custom Errors Are Non-Negotiable in My Rust Applications
https://tristonarmstrong.com/blog/custom-errors-are-non-negotiable-in-my-rust-applications
5 comments
I ended up using thiserror everywhere but `:/src/bin/`, and using eyre in there.
It's a nice compromise between being precise on your errors with your code, but allowing you to be careless at the very end of the error lifecycle since running into errors there has very few ways of going about them, and you don't want to deal with the burden of updating that error handling all the time.
It's a nice compromise between being precise on your errors with your code, but allowing you to be careless at the very end of the error lifecycle since running into errors there has very few ways of going about them, and you don't want to deal with the burden of updating that error handling all the time.
I just wish support would land for `backtrace` on stable.
[deleted]
is that supposed to be https://tristonarmstrong.com/blog/custom-rust-errors ?
Automatically generates From impls like this and a Display impl that lets you describe the error case with more detail. Very very good ergonomics and completely transparent to downstream libraries.