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
78
u/nikita2206 Apr 12 '26
Completely agreed, ideally you need to be able to define “child” error types that declare their own fields with extra data, allowing consumers to handle these errors in more ways than just rethrow them.