Replace 'die' by 'throw'.