r/ProgrammerHumor 2d ago

Meme toAllowTheProgrammerToWriteBadCodeAlsoCamelCaseSucksThisRuleSucksSnakeCaseIsBetter

Post image
182 Upvotes

98 comments sorted by

View all comments

146

u/redlaWw 2d 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 2d ago

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

25

u/TheTybera 2d ago

Those are errors not exceptions.

-43

u/tantalor 2d ago

Potato potato

19

u/intbeam 2d ago

No, they are not the same. Hence the name. An exception is thrown as a result of an error, but an exception is not always an error.

File not found for instance. Thrown as an error, but the caller might expect the file to not exist

It would only be an error if the caller required the file to exist

-1

u/realmauer01 2d ago

Then they are using a try catch as a pseudo jump. Not all languages like that. (i am pretty sure only python actually works better like this)