Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5e96f1f

Browse files
committed
Correct the description of PyErr_Restore().
Closes SF bug #577000.
1 parent 7b02551 commit 5e96f1f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/api/exceptions.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ \chapter{Exception Handling \label{exceptionHandling}}
102102
indicator is already set, it is cleared first. If the objects are
103103
\NULL, the error indicator is cleared. Do not pass a \NULL{} type
104104
and non-\NULL{} value or traceback. The exception type should be a
105-
string or class; if it is a class, the value should be an instance
106-
of that class. Do not pass an invalid exception type or value.
105+
string or class. Do not pass an invalid exception type or value.
107106
(Violating these rules will cause subtle problems later.) This call
108107
takes away a reference to each object: you must own a reference to
109108
each object before the call and after the call you no longer own
110109
these references. (If you don't understand this, don't use this
111110
function. I warned you.) \note{This function is normally only used
112111
by code that needs to save and restore the error indicator
113-
temporarily.}
112+
temporarily; use \cfunction{PyErr_Fetch()} to save the current
113+
exception state.}
114114
\end{cfuncdesc}
115115

116116
\begin{cfuncdesc}{void}{PyErr_SetString}{PyObject *type, char *message}

0 commit comments

Comments
 (0)