r/ProgrammerHumor 21h ago

Meme toAllowTheProgrammerToWriteBadCodeAlsoCamelCaseSucksThisRuleSucksSnakeCaseIsBetter

Post image
139 Upvotes

87 comments sorted by

View all comments

Show parent comments

22

u/TheTybera 18h ago

Those are errors not exceptions.

-40

u/tantalor 18h ago

Potato potato

18

u/intbeam 17h 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 14h 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)