What happens if a finally block throws an exception?

If a finally block throws an exception what exactly happens ?

That exception propagates out and up, and will (can) be handled at a higher level.

Your finally block will not be completed beyond the point where the exception is thrown.

If the finally block was executing during the handling of an earlier exception then that first exception is lost.

C# 4 Language Specification ยง 8.9.5: If the finally block throws another exception, processing of the current exception is terminated.

Leave a Comment