summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2013-04-14 09:16:46 (GMT)
committerGeorg Brandl <georg@python.org>2013-04-14 09:16:46 (GMT)
commitf36f20f850c10e8828ada85507680eb6529ef920 (patch)
treeff60e60b9df00a7f8fc038f1058aa69f1f7dd2d1 /Doc/c-api
parent6d9e14593ed45921e7a34e715ac17debdac3fd5a (diff)
parent991fc5736e73c9c197cbaf758127c1057d16bacd (diff)
downloadcpython-f36f20f850c10e8828ada85507680eb6529ef920.zip
cpython-f36f20f850c10e8828ada85507680eb6529ef920.tar.gz
cpython-f36f20f850c10e8828ada85507680eb6529ef920.tar.bz2
merge with 3.3
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/exceptions.rst40
1 files changed, 29 insertions, 11 deletions
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst
index 9a66b7f..c0c30a0 100644
--- a/Doc/c-api/exceptions.rst
+++ b/Doc/c-api/exceptions.rst
@@ -222,13 +222,19 @@ in various ways. There is a separate error indicator for each thread.
when the system call returns an error.
-.. c:function:: PyObject* PyErr_SetFromErrnoWithFilename(PyObject *type, const char *filename)
+.. c:function:: PyObject* PyErr_SetFromErrnoWithFilenameObject(PyObject *type, PyObject *filenameObject)
Similar to :c:func:`PyErr_SetFromErrno`, with the additional behavior that if
- *filename* is not *NULL*, it is passed to the constructor of *type* as a third
- parameter. In the case of exceptions such as :exc:`IOError` and :exc:`OSError`,
- this is used to define the :attr:`filename` attribute of the exception instance.
- *filename* is decoded from the filesystem encoding
+ *filenameObject* is not *NULL*, it is passed to the constructor of *type* as
+ a third parameter. In the case of exceptions such as :exc:`IOError` and
+ :exc:`OSError`, this is used to define the :attr:`filename` attribute of the
+ exception instance.
+
+
+.. c:function:: PyObject* PyErr_SetFromErrnoWithFilename(PyObject *type, const char *filename)
+
+ Similar to :c:func:`PyErr_SetFromErrnoWithFilenameObject`, but the filename
+ is given as a C string. *filename* is decoded from the filesystem encoding
(:func:`sys.getfilesystemencoding`).
@@ -250,16 +256,28 @@ in various ways. There is a separate error indicator for each thread.
specifying the exception type to be raised. Availability: Windows.
+.. c:function:: PyObject* PyErr_SetFromWindowsErrWithFilenameObject(int ierr, PyObject *filenameObject)
+
+ Similar to :c:func:`PyErr_SetFromWindowsErr`, with the additional behavior
+ that if *filenameObject* is not *NULL*, it is passed to the constructor of
+ :exc:`WindowsError` as a third parameter. Availability: Windows.
+
+
.. c:function:: PyObject* PyErr_SetFromWindowsErrWithFilename(int ierr, const char *filename)
- Similar to :c:func:`PyErr_SetFromWindowsErr`, with the additional behavior that
- if *filename* is not *NULL*, it is passed to the constructor of
- :exc:`WindowsError` as a third parameter. *filename* is decoded from the
- filesystem encoding (:func:`sys.getfilesystemencoding`). Availability:
- Windows.
+ Similar to :c:func:`PyErr_SetFromWindowsErrWithFilenameObject`, but the
+ filename is given as a C string. *filename* is decoded from the filesystem
+ encoding (:func:`sys.getfilesystemencoding`). Availability: Windows.
+
+
+.. c:function:: PyObject* PyErr_SetExcFromWindowsErrWithFilenameObject(PyObject *type, int ierr, PyObject *filename)
+
+ Similar to :c:func:`PyErr_SetFromWindowsErrWithFilenameObject`, with an
+ additional parameter specifying the exception type to be raised.
+ Availability: Windows.
-.. c:function:: PyObject* PyErr_SetExcFromWindowsErrWithFilename(PyObject *type, int ierr, char *filename)
+.. c:function:: PyObject* PyErr_SetExcFromWindowsErrWithFilename(PyObject *type, int ierr, const char *filename)
Similar to :c:func:`PyErr_SetFromWindowsErrWithFilename`, with an additional
parameter specifying the exception type to be raised. Availability: Windows.