Mercurial > cpython-lru_cache-weakref
annotate Doc/lib/libcgitb.tex @ 21283:d4907cdcc299 legacy-trunk
Use an immutable tuple for __slots instead of a mutable list
Bump version number
| author | Andrew M. Kuchling <amk@amk.ca> |
|---|---|
| date | Fri, 07 Dec 2001 14:22:13 +0000 |
| parents | f79e4719db96 |
| children | 3a93145b6a96 |
| rev | line source |
|---|---|
|
21204
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1 \section{\module{cgitb} --- |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
2 Traceback manager for CGI scripts} |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
3 |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
4 \declaremodule{standard}{cgitb} |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
5 \modulesynopsis{Configurable traceback handler for CGI scripts.} |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
6 \moduleauthor{Ka Ping Yee}{ping@lfw.org} |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
7 \sectionauthor{Fred L. Drake, Jr.}{fdrake@acm.org} |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
8 |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
9 \index{CGI!tracebacks} |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
10 \index{traceback!in CGI scripts} |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
11 |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
12 The \module{cgitb} module provides a special exception handler for CGI |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
13 scripts. Using this module, an exception raised and left uncaught in |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
14 a CGI script can be presented as colorized HTML in the user's Web |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
15 browser. The options to the \function{enable()} function can be used |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
16 to control whether the colorized traceback is presented and whether |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
17 the traceback is logged to a file for later analysis. |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
18 |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
19 |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
20 \begin{funcdesc}{enable}{\optional{display\optional{, logdir\optional{, |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
21 context}}}} |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
22 This function causes the \module{cgitb} module to take over the |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
23 interpreters default handling for exceptions that propogate out of |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
24 the top level of a script. The causes \module{cgitb} to set the |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
25 value of \code{\refmodule{sys}.excepthook}. |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
26 |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
27 The optional argument \var{display} defaults to true and can be set |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
28 to false to suppress sending the traceback to the browser. |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
29 \var{logdir}, if given, should be a directory to cause tracebacks to |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
30 be written to files there; by default tracebacks will not be written |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
31 to files. \var{context} is the number of lines of context around |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
32 the offending line in a traceback display; this defaults to |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
33 \code{5}. |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
34 \end{funcdesc} |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
35 |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
36 \begin{funcdesc}{handler}{\optional{info}} |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
37 This function handles an exception using the default settings. This |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
38 can be used when you've caught an exception and want to report it |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
39 using \module{cgitb}, but need to continue processing. |
|
f79e4719db96
Documentation for the "cgitb" module.
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
40 \end{funcdesc} |
