mirror of
https://github.com/python/cpython.git
synced 2025-09-17 06:06:25 +00:00
#7033: add new API function PyErr_NewExceptionWithDoc, for easily giving new exceptions a docstring.
This commit is contained in:
parent
02e7dfde63
commit
740cdc3a9f
7 changed files with 119 additions and 2 deletions
|
@ -220,8 +220,10 @@ PyAPI_FUNC(void) _PyErr_BadInternalCall(char *filename, int lineno);
|
|||
#define PyErr_BadInternalCall() _PyErr_BadInternalCall(__FILE__, __LINE__)
|
||||
|
||||
/* Function to create a new exception */
|
||||
PyAPI_FUNC(PyObject *) PyErr_NewException(char *name, PyObject *base,
|
||||
PyObject *dict);
|
||||
PyAPI_FUNC(PyObject *) PyErr_NewException(
|
||||
char *name, PyObject *base, PyObject *dict);
|
||||
PyAPI_FUNC(PyObject *) PyErr_NewExceptionWithDoc(
|
||||
char *name, char *doc, PyObject *base, PyObject *dict);
|
||||
PyAPI_FUNC(void) PyErr_WriteUnraisable(PyObject *);
|
||||
|
||||
/* In sigcheck.c or signalmodule.c */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue