News for hackers. Stuff that matters.
Re:Overview of Rust error handling libraries by unlinked_dll on Friday November 22, 2019 @02:23PM (#21609048)
One pattern is to use your own crate-level Error type and then Result::map_err to bubble up other error types into your own thing. Example:

https://play.rust-lang.org/?version=stable&mode=debug&editio...

This makes error handling a little more verbose but you can use some quick and dirty macros for that.

Re:Overview of Rust error handling libraries by shepmaster on Friday November 22, 2019 @03:15PM (#21609581)
> but you can use some quick and dirty macros for that.

That is the point of most of the libraries described in the article — to prevent having to recreate this particular wheel each time you need it. Do all Rust programs/libraries need one of the libraries? Not at all, but I find that using one that has some nice bells and whistles will encourage the programmer to improve the errors and their messages.