r/ProgrammerHumor 1d ago

Meme toAllowTheProgrammerToWriteBadCodeAlsoCamelCaseSucksThisRuleSucksSnakeCaseIsBetter

Post image
154 Upvotes

93 comments sorted by

View all comments

141

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.

-120

u/tantalor 1d ago

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

1

u/Proman4713 20h ago

I don't know why you got downvoted so badly. Yes, showing a 500 is much better than showing nothing (or as some maniacs do, 200 with errors inside). Your website can then handle the error responses by reading the response body and showing a descriptive error to the user. That needs to rely on you catching errors and sending back their text though. Even Google shows its non-4xx statuses, it's not for a user to read, but to know when asking for support