Mercurial > cpython-lru_cache-weakref
diff Doc/api/exceptions.tex @ 25904:51828ea50b59 legacy-trunk
Correct the description of PyErr_Restore().
Closes SF bug #577000.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Thu, 24 Oct 2002 20:54:18 +0000 |
| parents | d2dbea17fc6f |
| children | 701b797bbdc8 |
line wrap: on
line diff
--- a/Doc/api/exceptions.tex Thu Oct 24 20:03:29 2002 +0000 +++ b/Doc/api/exceptions.tex Thu Oct 24 20:54:18 2002 +0000 @@ -102,15 +102,15 @@ indicator is already set, it is cleared first. If the objects are \NULL, the error indicator is cleared. Do not pass a \NULL{} type and non-\NULL{} value or traceback. The exception type should be a - string or class; if it is a class, the value should be an instance - of that class. Do not pass an invalid exception type or value. + string or class. Do not pass an invalid exception type or value. (Violating these rules will cause subtle problems later.) This call takes away a reference to each object: you must own a reference to each object before the call and after the call you no longer own these references. (If you don't understand this, don't use this function. I warned you.) \note{This function is normally only used by code that needs to save and restore the error indicator - temporarily.} + temporarily; use \cfunction{PyErr_Fetch()} to save the current + exception state.} \end{cfuncdesc} \begin{cfuncdesc}{void}{PyErr_SetString}{PyObject *type, char *message}
