Tuesday, April 11, 2006

Checked Exception ?

where to handle Checked exception ? and where-not ?
Java's checked exceptions have become highly controversial and it seems to be accepted in the Java community that checked exceptions should only be used when the exceptions can be handled in the application.
Exceptions that cannot be handled in any meaningful way by application code should be allowed to go on unchecked. for ex : SQLException is a checked exception, application code must handle it, either catching it and doing something with it or explicitly throwing it to calling code.

0 comments: