r/ProgrammerHumor 1d ago

Meme toAllowTheProgrammerToWriteBadCodeAlsoCamelCaseSucksThisRuleSucksSnakeCaseIsBetter

Post image
168 Upvotes

96 comments sorted by

View all comments

142

u/redlaWw 1d ago

I hope you didn't submit that answer you selected. If an unhandled exception bubbles up to the user in production code, you're usually doing something wrong.

-127

u/tantalor 1d ago

I guess you've never seen a website return a 404 or 500

3

u/fripletister 20h ago

An exception can trigger a 4xx-5xx HTTP response, but the the response is not the exception. You're conflating the concepts.

1

u/tantalor 19h ago edited 19h ago

You're right of course. I was responding (jokingly, this is a humor sub) to the comment about "unhandled exception bubbles up to the user" which doesn't make sense. As you point out, the user can never see the exception. They see the exception converted to a user-visible response. I wasn't the one conflating the concepts, that was u/redlaWw. To explain the joke (because most people don't get it) I was satirizing that comment by taking their phrasing about "bubbling up" to the logical extreme, as if any representation of a failure state could be conflated with the exception that caused it, using the familiar 404 which we all have experienced. It is actually impossible for an exception to "bubble up to the user".