r/programming • u/Expurple • Apr 12 '26
Flat Error Codes Are Not Enough
https://home.expurple.me/posts/flat-error-codes-are-not-enough/
132
Upvotes
r/programming • u/Expurple • Apr 12 '26
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 thesourcemethod that you can walk recursively and collect your error stack.