Losing exception and traceback