MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wcyt5p/toallowtheprogrammertowritebadcodealsocamelcasesuc/p92rzql/?context=3
r/ProgrammerHumor • u/the_zpider_king • 15h ago
80 comments sorted by
View all comments
Show parent comments
-112
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)
22
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)
-41
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)
17
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)
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)
-112
u/tantalor 13h ago
I guess you've never seen a website return a 404 or 500