Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libcgitb.tex @ 29511:d1acf89d1c49 legacy-trunk
SF Patch 569574 - enhancements to cgitb for plain text display
| author | Skip Montanaro <skip@pobox.com> |
|---|---|
| date | Tue, 17 Jun 2003 12:58:31 +0000 |
| parents | a03b13be2f68 |
| children | 96d538488aee |
line wrap: on
line diff
--- a/Doc/lib/libcgitb.tex Tue Jun 17 05:05:49 2003 +0000 +++ b/Doc/lib/libcgitb.tex Tue Jun 17 12:58:31 2003 +0000 @@ -12,9 +12,12 @@ \index{exceptions!in CGI scripts} \index{tracebacks!in CGI scripts} -The \module{cgitb} module provides a special exception handler for CGI -scripts. After this module is activated, if an uncaught exception occurs, -a detailed, formatted report will be sent to the Web browser. The report +The \module{cgitb} module provides a special exception handler for Python +scripts. (It's name is a bit misleading. It was originally designed to +display extensive traceback information in HTML for CGI scripts. It was +later generalized to also display this information in plain text.) After +this module is activated, if an uncaught exception occurs, a detailed, +formatted report will be displayed. The report includes a traceback showing excerpts of the source code for each level, as well as the values of the arguments and local variables to currently running functions, to help you debug the problem. Optionally, you can @@ -32,7 +35,7 @@ \begin{funcdesc}{enable}{\optional{display\optional{, logdir\optional{, - context}}}} + context\optional{, format}}}}} This function causes the \module{cgitb} module to take over the interpreter's default handling for exceptions by setting the value of \code{\refmodule{sys}.excepthook}. @@ -46,6 +49,9 @@ The optional argument \var{context} is the number of lines of context to display around the current line of source code in the traceback; this defaults to \code{5}. + If the optional argument \var{format} is \code{"html"}, the output is + formatted as HTML. Any other value forces plain text output. The default + value is \code{"html"}. \end{funcdesc} \begin{funcdesc}{handler}{\optional{info}}
