Error-Handling Designs

⚓ rust    📅 2025-05-20    👤 surdeus    👁️ 4      

surdeus

Warning

This post was published 40 days ago. The information described in this article may have changed.

Info

This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Error-Handling Designs

I've written and maintain several Rust applications of substantial complexity.

When I began, I decided to use String in the "error channel" (as we Scala programmers call the monad "error" type parameter), as a punt.

What I've discovered is that it's entirely sufficient. No, I don't have fine-grained (or any) error categorization, but, in practice, the origin of the error coupled with an appropriate message (typically, in application layers, this is a lower-level error message with additional information) is sufficient to diagnose any error.

Thus, I have back-burnered my plans to switch to Anyhow.

So, I wish to ask, am I missing something? Is there an anyhow (or other) evangelist that would like to argue that using String errors is poor practice?

4 posts - 3 participants

Read full topic

🏷️ rust_feed