MCPcopy Index your code
hub / github.com/python/cpython / log_exception

Method log_exception

Lib/wsgiref/handlers.py:369–383  ·  view source on GitHub ↗

Log the 'exc_info' tuple in the server log Subclasses may override to retarget the output or change its format.

(self,exc_info)

Source from the content-addressed store, hash-verified

367
368
369 def log_exception(self,exc_info):
370 """Log the 'exc_info' tuple in the server log
371
372 Subclasses may override to retarget the output or change its format.
373 """
374 try:
375 from traceback import print_exception
376 stderr = self.get_stderr()
377 print_exception(
378 exc_info[0], exc_info[1], exc_info[2],
379 self.traceback_limit, stderr
380 )
381 stderr.flush()
382 finally:
383 exc_info = None
384
385 def handle_error(self):
386 """Log current error, and send error output to client if possible"""

Callers 1

handle_errorMethod · 0.95

Calls 3

get_stderrMethod · 0.95
print_exceptionFunction · 0.90
flushMethod · 0.45

Tested by

no test coverage detected