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

Method error_output

Lib/wsgiref/handlers.py:393–407  ·  view source on GitHub ↗

WSGI mini-app to create error output By default, this just uses the 'error_status', 'error_headers', and 'error_body' attributes to generate an output page. It can be overridden in a subclass to dynamically generate diagnostics, choose an appropriate message for the

(self, environ, start_response)

Source from the content-addressed store, hash-verified

391 # XXX else: attempt advanced recovery techniques for HTML or text?
392
393 def error_output(self, environ, start_response):
394 """WSGI mini-app to create error output
395
396 By default, this just uses the 'error_status', 'error_headers',
397 and 'error_body' attributes to generate an output page. It can
398 be overridden in a subclass to dynamically generate diagnostics,
399 choose an appropriate message for the user's preferred language, etc.
400
401 Note, however, that it's not recommended from a security perspective to
402 spit out diagnostics to any old user; ideally, you should have to do
403 something special to enable diagnostic output, which is why we don't
404 include any here!
405 """
406 start_response(self.error_status,self.error_headers[:],sys.exc_info())
407 return [self.error_body]
408
409
410 # Pure abstract methods; *must* be overridden in subclasses

Callers 1

handle_errorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected