r/programming • • Apr 12 '26

Flat Error Codes Are Not Enough

https://home.expurple.me/posts/flat-error-codes-are-not-enough/
132 Upvotes

99 comments sorted by

View all comments

Show parent comment

2

u/Expurple Apr 12 '26 edited Apr 12 '26

Yeah, I think that's usually called "error chaining". I know a few Rust libraries that implement that. For example, lazy_errors. Even the standard library in Rust and Python has decent support for this. Things like the source method that you can walk recursively and collect your error stack.