News for hackers. Stuff that matters.
Re:Java’s Checked Exceptions Are Evil? (2015) by leothekim on Sunday September 23, 2018 @09:42AM (#18051040)
Nothing about checked exceptions inherently prevents the failure scenarios you list, particularly the one about the power failure.
Re:Java’s Checked Exceptions Are Evil? (2015) by hyperman1 on Sunday September 23, 2018 @10:35AM (#18051248)
Correct, this was about swallowing errors instead of rethrowing/handling.

Checked exceptions are good if you want to be sure your caller does something when things go south. Some examples from my experience:

* Most things that should be told to the end user, i.e. Business Exceptions. E.g. a webshop user tries to buy something but your stock has been emptied why he was deciding if he should buy or not.

* Follow-up after a modification: If you wrote half a file, you can delete it in your catch IOException instead of letting it linger around. My company has a tendency to pick up and process any file found in an output directory as soon as you release the file lock. But just not filling your disk is good enough for me as reason.

Re:Java’s Checked Exceptions Are Evil? (2015) by leothekim on Sunday September 23, 2018 @09:46AM (#18051058)
Also, I gave a bad example for empty try catch. In this case, I would want a runtime exception thrown. Apologies for misleading the conversation.
Re:Java’s Checked Exceptions Are Evil? (2015) by hyperman1 on Sunday September 23, 2018 @10:13AM (#18051146)
In that case, you avoided disaster and I'm starting to agree with you.