mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
document PyErr_Format
This commit is contained in:
parent
0682be4524
commit
98605b54b4
2 changed files with 16 additions and 0 deletions
|
@ -858,6 +858,17 @@ specify an arbitrary Python object for the ``value'' of the exception.
|
||||||
You need not increment its reference count.
|
You need not increment its reference count.
|
||||||
\end{cfuncdesc}
|
\end{cfuncdesc}
|
||||||
|
|
||||||
|
\begin{cfuncdesc}{PyObject*}{PyErr_Format}{PyObject *exception, const char *format, ...}
|
||||||
|
This function sets the error indicator using a printf-style format
|
||||||
|
string. The first argument specifies the exception type and the
|
||||||
|
second argument specifies the format string for the exception. Any
|
||||||
|
subsequent arguments are converted to output by the C library's
|
||||||
|
\cfunction{vsprintf()} function. The buffer used internally by
|
||||||
|
PyErr_Format is 500 bytes long. The caller is responsible for
|
||||||
|
guaranteeing that the formatted output does not overflow the buffer.
|
||||||
|
The return value is always \NULL{}.
|
||||||
|
\end{cfuncdesc}
|
||||||
|
|
||||||
\begin{cfuncdesc}{void}{PyErr_SetNone}{PyObject *type}
|
\begin{cfuncdesc}{void}{PyErr_SetNone}{PyObject *type}
|
||||||
This is a shorthand for \samp{PyErr_SetObject(\var{type}, Py_None)}.
|
This is a shorthand for \samp{PyErr_SetObject(\var{type}, Py_None)}.
|
||||||
\end{cfuncdesc}
|
\end{cfuncdesc}
|
||||||
|
|
|
@ -194,6 +194,11 @@ PyErr_SetString:void:::
|
||||||
PyErr_SetString:PyObject*:type:+1:
|
PyErr_SetString:PyObject*:type:+1:
|
||||||
PyErr_SetString:char*:message::
|
PyErr_SetString:char*:message::
|
||||||
|
|
||||||
|
PyErr_Format:PyObject*::null:
|
||||||
|
PyErr_Format:PyObject*:exception:+1:
|
||||||
|
PyErr_Format:char*:format::
|
||||||
|
PyErr_Format::...::
|
||||||
|
|
||||||
PyEval_AcquireLock:void:::
|
PyEval_AcquireLock:void:::
|
||||||
|
|
||||||
PyEval_AcquireThread:void:::
|
PyEval_AcquireThread:void:::
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue