Its tied to resource cleanup, be it a thread, socket, file descriptor, memory, ...:
| Resource r = null;
| try
| {
| r = ...;
| }
| catch(Throwable t)
| {
| if( r != null )
| r.close();
| }
|
A method that declares a Throwable is an indication of a potential resource leak, or state
transition inconsistency. More generally the issue is not having a complete state machine
model of the subsystem and not explicitly dealing with the subsystem state when an error
occurs. In this model unchecked vs checked exceptions related to whether or not the
current system state can safely ignore the exception and transition correctly to the next
state. If it can the exception can be unchecked. If it cannot the exception is checked and
needs to be caught.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961329#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...