Trap unexpected exits, report failure