this post was submitted on 23 Aug 2025
21 points (100.0% liked)

Rust

7576 readers
3 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
 

I have been using thiserror, and somtimes snafu, for error handling in libraries and anyhow for error handling in applications.

This blog post describes a new library, Stackerror, that looks interesting. The post also gives a good overview of error handling in Rust.

top 4 comments
sorted by: hot top controversial new old
[–] alienscience@programming.dev 5 points 3 months ago
[–] alzymologist@sopuli.xyz 3 points 3 months ago
[–] sukhmel@programming.dev 2 points 3 months ago

I'm not entirely sold on the idea, because the article shows no example of defining and using special error codes. It leaves an impression that if anything you want to recover from is IO and HTTP (no HTTP/2, too) then it's all good.

Still it looks interesting and I will take a deeper look into it later

[–] arcterus@piefed.blahaj.zone 1 points 3 months ago

I may be wrong since it seemed to mostly gloss over deriving new errors, but this article gave me the impression that it's not much different from a predefined thiserror type.