]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added documentation for PyErr_SetFromErrnoWithFilename().
authorFred Drake <fdrake@acm.org>
Thu, 21 Jun 2001 18:58:39 +0000 (18:58 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 21 Jun 2001 18:58:39 +0000 (18:58 +0000)
Doc/api/api.tex

index 6b41cf08c9bf3fd0d44398c09c9a87f9e394c218..bdf4a79ac6080a7fd1519b450fe62c70d6c75f67 100644 (file)
@@ -934,6 +934,16 @@ returns \NULL{}, so a wrapper function around a system call can write
 error.
 \end{cfuncdesc}
 
+\begin{cfuncdesc}{PyObject*}{PyErr_SetFromErrnoWithFilename}{PyObject *type,
+                                                             char *filename}
+Similar to \cfunction{PyErr_SetFromErrno()}, with the additional
+behavior that if \var{filename} is not \NULL, it is passed to the
+constructor of \var{type} as a third parameter.  In the case of
+exceptions such as \exception{IOError} and \exception{OSError}, this
+is used to define the \member{filename} attribute of the exception
+instance.
+\end{cfuncdesc}
+
 \begin{cfuncdesc}{void}{PyErr_BadInternalCall}{}
 This is a shorthand for \samp{PyErr_SetString(PyExc_TypeError,
 \var{message})}, where \var{message} indicates that an internal