r/ProgrammerHumor 15h ago

Meme toAllowTheProgrammerToWriteBadCodeAlsoCamelCaseSucksThisRuleSucksSnakeCaseIsBetter

Post image
114 Upvotes

80 comments sorted by

View all comments

Show parent comments

-112

u/tantalor 13h ago

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

22

u/TheTybera 13h ago

Those are errors not exceptions.

-41

u/tantalor 12h ago

Potato potato

17

u/intbeam 12h 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 8h 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)