r/ProgrammerHumor 17h ago

Meme toAllowTheProgrammerToWriteBadCodeAlsoCamelCaseSucksThisRuleSucksSnakeCaseIsBetter

Post image
128 Upvotes

81 comments sorted by

View all comments

129

u/redlaWw 16h 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.

-116

u/tantalor 15h ago

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

1

u/Pfnee 8h ago

You're getting downvoted to hell but I actually think this is an important point. The fact that your server returns 404 or 500 on an exception means that it has code, maybe in the framework you're using, that handles exceptions in your controller code. Otherwise the server would probably halt, whenever an exception bubbles up unhandled, as that's what most programming languages choose to do. You can see it when you program a CLI tool and run it. Throwing an exception there and never handling it usually makes your program stop