Proper error handling

so, i got this co-worker that insists to check every little detail on everything that might throw an exception, just to make sure that there won’t be any.

think of file exceptions, when the file does not exist, when it’s readonly, when you cannot open it exclusively, when the path might be incorrect, or when there is a permission issue.

checking all of this takes a lot of instructions – he always says that a exception is wasting too many cycles, while all of his checks (think, every single file in a 1000 file listing) make our application horrendously slow.

do you guys know anything that can stop this madness?

He insist on to not ever throw any exception at all. (also not re-throwing)

submitted by /u/Kirides
[link] [comments]

Leave a Reply