3 ms·
It’s a nice summary about error handling in Rust, but doesn’t present anything new for anyone who has been writing Rust for a while. The title “more than you’v
by codetrotter 3y ago
It’s a nice summary about error handling in Rust, but doesn’t present anything new for anyone who has been writing Rust for a while.
The title “more than you’ve ever wanted to know about errors in Rust” had me expecting to learn something new.
Still a nice intro though, and could for example form part of the documentation for shuttle in the future, to help people who are new to Rust get into using shuttle.
- sshine 3y agoYes, nice intro to errors, and nothing new. I would have liked a small conclusion under the chapter that names thiserror, anyhow and eyre, arguing why you might pick one library over another, and which one to pick if you don't have any requirements (anyhow). This blog post compares the two first with examples on when they're neat and cumbersome: https://www.shakacode.com/blog/thiserror-anyhow-or-how-i-handle-errors-in-rust-apps/ https://www.shakacode.com/blog/thiserror-anyhow-or-how-i-han...
- epage 3y agoI appreciated the approach in https://sabrinajewson.org/blog/errors https://sabrinajewson.org/blog/errors
- pducks32 3y agoWhen I first used Rust, I was using failure and it just made sense to me. And then we got the 2nd (3rd?) wave of error libraries and nothing has ever made simple sense to me since. Never saw this link and it’s wonderful, it’s exactly how I think of errors. Thanks!
- deagle50 3y agoYea this should be called "The minimum you need to know about errors in Rust". These click bait self promotion blog post titles are getting out of hand.
- pvsnp 3y agoI agree. This would’ve likely saved me a lot of time that was spent on trial and error but now it’s not new. But this is great reference to forward to new folks getting started.