mirror of
https://github.com/python/cpython.git
synced 2026-05-03 09:01:07 +00:00
gh-102406: replace exception chaining by PEP-678 notes in codecs (#102407)
This commit is contained in:
parent
e6ecd3e6b4
commit
76350e85eb
5 changed files with 64 additions and 206 deletions
|
|
@ -116,24 +116,6 @@ PyAPI_FUNC(int) _PyException_AddNote(
|
|||
PyObject *exc,
|
||||
PyObject *note);
|
||||
|
||||
/* Helper that attempts to replace the current exception with one of the
|
||||
* same type but with a prefix added to the exception text. The resulting
|
||||
* exception description looks like:
|
||||
*
|
||||
* prefix (exc_type: original_exc_str)
|
||||
*
|
||||
* Only some exceptions can be safely replaced. If the function determines
|
||||
* it isn't safe to perform the replacement, it will leave the original
|
||||
* unmodified exception in place.
|
||||
*
|
||||
* Returns a borrowed reference to the new exception (if any), NULL if the
|
||||
* existing exception was left in place.
|
||||
*/
|
||||
PyAPI_FUNC(PyObject *) _PyErr_TrySetFromCause(
|
||||
const char *prefix_format, /* ASCII-encoded string */
|
||||
...
|
||||
);
|
||||
|
||||
/* In signalmodule.c */
|
||||
|
||||
int PySignal_SetWakeupFd(int fd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue