In an real environment situation your example should be the best way forward. Take note AKI 
On Fri, Nov 25, 2011 at 11:20, Billy <billyx5@gmail.com> wrote:
@Aki, @Daniel 
First, it is not good practice to only catch the generic "Exception" - you should catch a specific Exception THEN catch Exception at the end
And the kind of nesting you use depends on whether you can handle the exception and allow execution to proceed or not
e.g.
 
try {

    //a. simple exception is thrown but i can handle and continue execution                
    try {

    } catch (SimpleException ex) {
        //handle and let execution continue                                                
    }

    //b. some weird exception thrown here                                                  
    //dont want anything beyond this point to execute if any WeirdException was thrown     

}
catch(SomeWeirdException swe) {

}
catch(AnotherWeirdException awe) {

}
catch(Exception ex) {

}
finally {
    //clean up before exit                                                                 
}



-Billy

_______________________________________________
Skunkworks mailing list
Skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------

Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke