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 scoder
Recipients Rosuav, belopolsky, gvanrossum, python-dev, r.david.murray, rhettinger, schlamar, scoder, serhiy.storchaka, vstinner
Date 2014-11-29.08:59:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1417251599.76.0.91840106708.issue22906@psf.upfronthosting.co.za>
In-reply-to
Content
Ah, right - chaining only happens automatically when the exception has already been caught and moved to sys.exc_info.

There's a _PyErr_ChainExceptions(), though, which does it for you. You should be able to say

    PyErr_Fetch(&x,&y,&z)
    PyErr_SetString()
    _PyErr_ChainExceptions(x,y,z)

(does pretty much what your code does as well)
History
Date User Action Args
2014-11-29 08:59:59scodersetrecipients: + scoder, gvanrossum, rhettinger, belopolsky, vstinner, r.david.murray, python-dev, schlamar, Rosuav, serhiy.storchaka
2014-11-29 08:59:59scodersetmessageid: <1417251599.76.0.91840106708.issue22906@psf.upfronthosting.co.za>
2014-11-29 08:59:59scoderlinkissue22906 messages
2014-11-29 08:59:59scodercreate