2
Reply

How to handle Exceptions that occur in the finally block ?

Minhaj Hussain

Minhaj Hussain

9y
1.2k
0
Reply

    Purpose of finally block is releasing resources or allocations.So there should not be any exception.

    Three Things happen when finally block throws an ExceptionOne: The Exception Propogates up and should be handled at a high level. If not handled at higher level, the application crashesTwo: The finally block execution stops at the point where the exception was thrown.Three: A) If the finally block is being executed after an exception has occurred in the try block B)and if that exception is not handledC)and if finally block throws an exception then the original exception that occurred in the try block is lost.