Raise exception when thread dies