Generalize the function 'die' by adding an argument for the last error number.