News for hackers. Stuff that matters.
Re:Why Use Structured Errors in Rust Applications? by dllthomas on Sunday June 01, 2025 @01:02PM (#44152262)
> the difference in Rust between just returning an error (a ? at the end of the expression that can return one) vs adding context is much higher

I don't disagree with what you've said, but I think this is likely to be read too strongly.

Adding a map_err before the ? is only a big step up in verbosity because the ? alone is so very terse.

Re:Why Use Structured Errors in Rust Applications? by lesuorac on Sunday June 01, 2025 @04:17PM (#44153495)
I just always make my own error type and as part of their creation throw a backtrace into the struct. Then using `?` gives me a stack trace for free.
Re:Why Use Structured Errors in Rust Applications? by dllthomas on Sunday June 01, 2025 @07:38PM (#44154594)
Yeah, if all the context you want is the backtrace, that works just fine.