This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients eric.snow, ncoghlan, pitrou, serhiy.storchaka, vstinner
Date 2018-05-22.17:44:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1527011056.94.0.682650639539.issue23188@psf.upfronthosting.co.za>
In-reply-to
Content
There is usually more complex code between PyErr_Fetch() and _PyErr_ChainExceptions():

        PyObject *exc, *val, *tb, *close_result;
        PyErr_Fetch(&exc, &val, &tb);
        close_result = _PyObject_CallMethodId(result, &PyId_close, NULL);
        _PyErr_ChainExceptions(exc, val, tb);
        Py_XDECREF(close_result);

Many exceptions can be raised and silenced or overridden between, but we are interesting in chaining the only latest exception (or restoring the original exception if all exceptions between were silenced).
History
Date User Action Args
2018-05-22 17:44:16serhiy.storchakasetrecipients: + serhiy.storchaka, ncoghlan, pitrou, vstinner, eric.snow
2018-05-22 17:44:16serhiy.storchakasetmessageid: <1527011056.94.0.682650639539.issue23188@psf.upfronthosting.co.za>
2018-05-22 17:44:16serhiy.storchakalinkissue23188 messages
2018-05-22 17:44:16serhiy.storchakacreate