error handler: do not call shutdown handler if error was already handled