Lets Learn

Opinion Matters

Posts Tagged ‘Finally’

Question – 5 : Make sure Exceptions Are Not Lost in Finally Blocks

Posted by Ankush on February 21, 2011

Let’s say you have an exception and you have added a finally block. Excetion will be lost and you will not not know what caused the excetion, it will be lost. And You want to protect against losing exception information when using multiple trycatch-finally blocks.

Hint : This really helps when you have multiple try/catch handler and you want to correctly rethrow the exception so that it bubblesup to the outer exception handler.

Do you have any suggestions which you can leave here as a part of the comment?


Posted in Questions | Tagged: , , , | 8 Comments »

%d bloggers like this: