posted 19 years ago
I have encountered some code where an exception is thrown in the try{} block, is caught and is in the process of being handled by the catch{} block when another exception occurs.
In this code, once the second exception occurs in the catch{} block, it proceeds directly to the finally{} block (of the first exception) with no indication that a second exception ever occurred.
I was only able to deduce what was happening by stepping thru the code with a debugger.
My questions are:
1) Is this correct exception handling behavior?
2) Should a second exception be thrown?
3) And, if a second exception should be thrown, should the finally{} block for the first exception be executed?