code: def _exception_default_handler(self, e):
          
          if isinstance(e, HTTPError):
              if e.log_message:
                  format = "%d %s: " + e.log_message
                  args = [e.status_code, self._request_summary()] + list(e.args)
                  app_log.warning(format, *args)
              if e.status_code not in httplib.responses:
                  app_log.error("Bad HTTP status code: %d", e.status_code)
                  self.send_error(500, exc_info=sys.exc_info())
              else:
                  self.send_error(e.status_code, exc_info=sys.exc_info())
          else:
              app_log.error("Uncaught exception %s\n%r", self._request_summary(),
                            self.request, exc_info=True)
              self.send_error(500, exc_info=sys.exc_info())
docs: This method is a copy of tornado.web.RequestHandler._handle_request_exception