summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/exceptions.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/c-api/exceptions.rst')
-rw-r--r--Doc/c-api/exceptions.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst
index 25f7c11..dc9d7b1 100644
--- a/Doc/c-api/exceptions.rst
+++ b/Doc/c-api/exceptions.rst
@@ -404,6 +404,15 @@ in various ways. There is a separate error indicator for each thread.
argument can be used to specify a dictionary of class variables and methods.
+.. cfunction:: PyObject* PyErr_NewExceptionWithDoc(char *name, char *doc, PyObject *base, PyObject *dict)
+
+ Same as :cfunc:`PyErr_NewException`, except that the new exception class can
+ easily be given a docstring: If *doc* is non-*NULL*, it will be used as the
+ docstring for the exception class.
+
+ .. versionadded:: 3.2
+
+
.. cfunction:: void PyErr_WriteUnraisable(PyObject *obj)
This utility function prints a warning message to ``sys.stderr`` when an