MCPcopy Create free account
hub / github.com/EasyIME/PIME / _handle_request_exception

Method _handle_request_exception

python/python3/tornado/web.py:1755–1775  ·  view source on GitHub ↗
(self, e: BaseException)

Source from the content-addressed store, hash-verified

1753 )
1754
1755 def _handle_request_exception(self, e: BaseException) -> None:
1756 if isinstance(e, Finish):
1757 # Not an error; just finish the request without logging.
1758 if not self._finished:
1759 self.finish(*e.args)
1760 return
1761 try:
1762 self.log_exception(*sys.exc_info())
1763 except Exception:
1764 # An error here should still get a best-effort send_error()
1765 # to avoid leaking the connection.
1766 app_log.error("Error in exception logger", exc_info=True)
1767 if self._finished:
1768 # Extra errors after the request has been finished should
1769 # be logged, but there is no reason to continue to try and
1770 # send a response.
1771 return
1772 if isinstance(e, HTTPError):
1773 self.send_error(e.status_code, exc_info=sys.exc_info())
1774 else:
1775 self.send_error(500, exc_info=sys.exc_info())
1776
1777 def log_exception(
1778 self,

Callers 1

_executeMethod · 0.95

Calls 4

finishMethod · 0.95
log_exceptionMethod · 0.95
send_errorMethod · 0.95
errorMethod · 0.80

Tested by

no test coverage detected