Pass exception into error handler