Resource allocation can generally be dealt with try/finally.
The "throws Throwable" is more for when you probably need
to perform some reversing operation in your state, e.g.
| step1();
| try
| {
| step2();
| }
| catch (Throwable t)
| {
| reverseStep1();
| handle(t);
| }
|
Of course step2() doesn't need to explicitly declare "throws Throwable"
but it does help to make you think about! :-)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961341#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...