Registered a simple error handler.