summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2000-09-01 02:47:25 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2000-09-01 02:47:25 (GMT)
commitb709df381034b6055f03644a8f2eb35cfc6cb411 (patch)
tree55a6c86396fefc64a68fef9a8621500c868320c4 /Doc
parentb9ce5ada37f271cd2e9ec67f86a82a166f1e1296 (diff)
downloadcpython-b709df381034b6055f03644a8f2eb35cfc6cb411.zip
cpython-b709df381034b6055f03644a8f2eb35cfc6cb411.tar.gz
cpython-b709df381034b6055f03644a8f2eb35cfc6cb411.tar.bz2
refactor __del__ exception handler into PyErr_WriteUnraisable
add sanity check to gc: if an exception occurs during GC, call PyErr_WriteUnraisable and then call Py_FatalEror.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/api/api.tex11
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/api/api.tex b/Doc/api/api.tex
index 1f20129..c8731c9 100644
--- a/Doc/api/api.tex
+++ b/Doc/api/api.tex
@@ -972,6 +972,17 @@ alternate base class. The \var{dict} argument can be used to specify
a dictionary of class variables and methods.
\end{cfuncdesc}
+\begin{cfuncdesc}{void}{PyErr_WriteUnraisable}{PyObject *obj}
+This utility function prints a warning message to \var{sys.stderr}
+when an exception has been set but it is impossible for the
+interpreter to actually raise the exception. It is used, for example,
+when an exception occurs in an \member{__del__} method.
+
+The function is called with a single argument \var{obj} that
+identifies where the context in which the unraisable exception
+occurred. The repr of \var{obj} will be printed in the warning
+message.
+\end{cfuncdesc}
\section{Standard Exceptions \label{standardExceptions}}