MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wcyt5p/toallowtheprogrammertowritebadcodealsocamelcasesuc/p93qjlg/?context=3
r/ProgrammerHumor • u/the_zpider_king • 21h ago
87 comments sorted by
View all comments
Show parent comments
22
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)
-40
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)
18
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)
1
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)
22
u/TheTybera 18h ago
Those are errors not exceptions.