paste.cgitb_catcher – catch exceptions using cgitb

WSGI middleware

Captures any exceptions and prints a pretty report. See the cgitb documentation for more.

Module Contents

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

Wraps the application in the cgitb (standard library) error catcher.

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