Mercurial > cpython-lru_cache-weakref
diff Doc/api/api.tex @ 14330:6dee1985c681 legacy-trunk
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.
| author | Jeremy Hylton <jeremy@alum.mit.edu> |
|---|---|
| date | Fri, 01 Sep 2000 02:47:25 +0000 |
| parents | b1a0fd3df1fc |
| children | 3b84c5ff89da |
line wrap: on
line diff
--- a/Doc/api/api.tex Fri Sep 01 02:43:38 2000 +0000 +++ b/Doc/api/api.tex Fri Sep 01 02:47:25 2000 +0000 @@ -972,6 +972,17 @@ 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}}
