Add general error handler.