Originally posted by Valentin Crettaz:
The reason why Exception is not fully considered as a checked exception has been the source of many debates.
Valentin
Let me see if I understand this:
If a method explicitly throws an Exception (the exact class), then the Exception must be caught or thrown by the caller, because Exception is a checked exception.
However, any method may throw a RuntimeException without declaring it in its throws clause since RuntimeException it is an unchecked exception. But RuntimeException is also a sub-class of Exception, so a try { methodThrowingRuntimeException(); } catch(Exception e){} block would catch the RuntimeException.
Is that why
Java allows us to catch an Exception even when the code in the try block doesn't throw any checked exceptions, including the special case of an empty try block?
Are there any web sites where I can read more about the debates regarding exception handling in Java?