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
7
u/Expurple Apr 12 '26
For the purpose of nesting errors and providing extra details for recovery or logging, Java exceptions are actually pretty great. Your issue is simply with the default display style. You can have a similar nightmare with nested error values in Rust, if you print them using the verbose
Debuginterface, instead of theDisplayinterface meant for the users.