Execute ensure block when the exception is unhandled