4 ms·
Ah, I see. In short, I consider `From::from` implementations for errors to be an anti-pattern. It is super easy to become lax about adding context with these i
by nagisa 5y ago
Ah, I see.
In short, I consider `From::from` implementations for errors to be an anti-pattern. It is super easy to become lax about adding context with these implementations in place. Especially as code is modified in the future.
I describe the approach that I use for errors in a detail in an article (https://kazlauskas.me/entries/errors.html https://kazlauskas.me/entries/errors.html) that has already been linked elsewhere in the thread. It is, as far as I can tell, pretty much equivalent to what `snafu` makes users to do.