Kaydet (Commit) c334b3af authored tarafından Fred Drake's avatar Fred Drake

Added documentation for PyErr_SetFromErrnoWithFilename().

üst c79ac00e
...@@ -934,6 +934,16 @@ returns \NULL{}, so a wrapper function around a system call can write ...@@ -934,6 +934,16 @@ returns \NULL{}, so a wrapper function around a system call can write
error. error.
\end{cfuncdesc} \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}{} \begin{cfuncdesc}{void}{PyErr_BadInternalCall}{}
This is a shorthand for \samp{PyErr_SetString(PyExc_TypeError, This is a shorthand for \samp{PyErr_SetString(PyExc_TypeError,
\var{message})}, where \var{message} indicates that an internal \var{message})}, where \var{message} indicates that an internal
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment