News for hackers. Stuff that matters.
Re:Guide to Error Handling in Rust by shepmaster on Sunday August 25, 2024 @06:57PM (#41352252)
I think you are asking for this config [0] (let me know if not, maybe provide an example), but I’d caution against renaming it back to “Error”. The context selectors are not themselves errors, they are more-or-less fancy error constructors. It’s the same logic I’d use to call it `Error::new` instead of `Error::error`.

Having the context selectors called the exact same as the variants was the way the original version of SNAFU worked, but it was also the number one cause of confusion and support requests.

[0]: https://docs.rs/snafu/latest/snafu/derive.Snafu.html#changin...

There are no comments on this comment yet.