Java / Exception
What happens if an exception is thrown from the finally or catch block in Java?
The new exception thrown at a catch or finally block will propagate out of that block, resulting the current exception be aborted or ignored as the new exception is propagated outward.
The new exception starts unwinding up the stack as ususal just like any other exceptions, stepping out of the current block (the catch or finally block) and subject to any applicable catch or finally blocks along the way.
One of the desired approaches is handling the exception of catch or finally block within the same block itself.
More Related questions...