summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-06-21 18:56:49 (GMT)
committerFred Drake <fdrake@acm.org>2001-06-21 18:56:49 (GMT)
commit495739f8b2de68887204ec852f67c7ed4e2ecf1d (patch)
tree31aefe9d28d6528ff5da7478bd8f9f48cc4d8262
parent257f7d07061d0f640a45a83f004e3869136659e8 (diff)
downloadcpython-495739f8b2de68887204ec852f67c7ed4e2ecf1d.zip
cpython-495739f8b2de68887204ec852f67c7ed4e2ecf1d.tar.gz
cpython-495739f8b2de68887204ec852f67c7ed4e2ecf1d.tar.bz2
Added documentation for PyErr_SetFromErrnoWithFilename().
-rw-r--r--Doc/api/api.tex10
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/api/api.tex b/Doc/api/api.tex
index 3fef843..5cc3dfd 100644
--- a/Doc/api/api.tex
+++ b/Doc/api/api.tex
@@ -951,6 +951,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