

def write_error(self, status_code, **kwargs):
    'Override to implement custom error pages.\n\n        ``write_error`` may call `write`, `render`, `set_header`, etc\n        to produce output as usual.\n\n        If this error was caused by an uncaught exception (including\n        HTTPError), an ``exc_info`` triple will be available as\n        ``kwargs["exc_info"]``.  Note that this exception may not be\n        the "current" exception for purposes of methods like\n        ``sys.exc_info()`` or ``traceback.format_exc``.\n        '
    if (self.settings.get('serve_traceback') and ('exc_info' in kwargs)):
        kwargs.set_header('Content-Type', 'text/plain')
        for line in traceback.format_exception(*kwargs['exc_info']):
            self.write(line)
        self.finish()
    else:
        self.finish(('<html><title>%(code)d: %(message)s</title><body>%(code)d: %(message)s</body></html>' % {
            'code': status_code,
            'message': self._reason,
        }))

dataset/ETHPy150Open RobotWebTools/rosbridge_suite/rosbridge_server/src/tornado/web.py RequestHandler.write_error/VarMisuse@37/221 `self`->`kwargs`