Stefan Behnel added the comment: 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) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22906> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com