News for hackers. Stuff that matters.
Re:Unchecked Java: Say Goodbye to Checked Exceptions Forever by breadwinner on Friday July 14, 2023 @11:54AM (#36725774)
Some errors are recoverable, some are not. When recoverable errors are possible you want to know what those errors are. If you don't then you will crash when you could have recovered. And that's the reason for writing down the list of possible exceptions where recovery and retry are possible (aka checked exceptions).

When recovery should not be attempted (example: "index out of bounds") then you don't want to declare or catch the exception, and that's when you use a subclass of RuntimeException in Java.

There are no comments on this comment yet.