Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Doc/library/cgitb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,24 @@ analysis.
value forces plain text output. The default value is ``"html"``.


.. function:: text(info, context=5)

This function handles the exception described by *info* (a 3-tuple containing
the result of :func:`sys.exc_info`), formatting its traceback as text and
returning the result as a string. The optional argument *context* is the
number of lines of context to display around the current line of source code
in the traceback; this defaults to ``5``.


.. function:: html(info, context=5)

This function handles the exception described by *info* (a 3-tuple containing
the result of :func:`sys.exc_info`), formatting its traceback as HTML and
returning the result as a string. The optional argument *context* is the
number of lines of context to display around the current line of source code
in the traceback; this defaults to ``5``.


.. function:: handler(info=None)

This function handles an exception using the default settings (that is, show a
Expand Down