Re:Show HN: Stack Error – ergonomic error handling for Rust
by rhabarba on Sunday May 18, 2025 @04:09PM
(#44023979)
I still prefer the Anyhow solution, but I like the approach here.
[ Parent
| on HN ]
Re:Show HN: Stack Error – ergonomic error handling for Rust
by IshKebab on Sunday May 18, 2025 @05:27PM
(#44024423)
Isn't this strictly superior to Anyhow? What do you like more about Anyhow?
Re:Show HN: Stack Error – ergonomic error handling for Rust
by rhabarba on Monday May 19, 2025 @04:14AM
(#44027552)
I prefer Anyhow's non-intrusiveness: "Result" is still "Result" and all I need is a "?". I agree with Stack Error's documentation that Anyhow can't help with debugging that well, but it's "good enough" in my opinion.
Re:Show HN: Stack Error – ergonomic error handling for Rust
by IshKebab on Monday May 19, 2025 @05:29PM
(#44035086)
Result in `anyhow::Result` though. It's still a different type. Or do you literally mean you like that it is still spelt the same?
And I think you can still use `?` with this if you don't want to add any context... Not 100% sure on that though.
Re:Show HN: Stack Error – ergonomic error handling for Rust
by rhabarba on Monday May 19, 2025 @08:51PM
(#44036636)
Might as well be my limited understanding from what I can read behind the link, to be fair.
Re:Show HN: Stack Error – ergonomic error handling for Rust
by garrinm on Sunday May 18, 2025 @09:20PM
(#44025740)
Anyhow still makes things easier for application development. The main drawback is that the resulting error type doesn't implement std::error::Error, so it's not suitable for library development (as pointed out in the anyhow documentation). Stack Error is a bit less ergonomic, but suitable for library development.