paste.cgitb_catcher – catch exceptions using cgitb

WSGI middleware

Captures any exceptions and prints a pretty report.

Module Contents

class paste.cgitb_catcher.CgitbMiddleware(app, global_conf=None, display=<NoDefault>, logdir=None, context=5, format='html')
paste.cgitb_catcher.make_cgitb_middleware(app, global_conf, display=<NoDefault>, logdir=None, context=5, format='html')

Wraps the application in an error catcher based on the former cgitb module in the standard library.

display:

If true (or debug is set in the global configuration) then the traceback will be displayed in the browser

logdir:

Writes logs of all errors in that directory

context:

Number of lines of context to show around each line of source code