Author ncoghlan
Recipients ncoghlan, pitrou, serhiy.storchaka
Date 2015-01-10.11:13:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1420888387.77.0.865807210042.issue23188@psf.upfronthosting.co.za>
In-reply-to
Content
Ah, confusion between "exception has been raised" and "we're in an active exception handler" is almost certainly what is happening. In both issue 22906 and my previous codec exception wrapping work, we're still in the C code that raised the exception, *before* we make it back to the eval loop and any Python level exception handling.

So I think that's the distinction we need to ensure is documented, and potentially a new public helper function provided - if you're in a Python level exception handler, then exception context chaining will be handled automatically for you in PyErr_SetObject, but if you're still in C code and haven't made it back to the eval loop after raising an exception, then you're going to have to do any exception chaining explicitly.
History
Date User Action Args
2015-01-10 11:13:07ncoghlansetrecipients: + ncoghlan, pitrou, serhiy.storchaka
2015-01-10 11:13:07ncoghlansetmessageid: <1420888387.77.0.865807210042.issue23188@psf.upfronthosting.co.za>
2015-01-10 11:13:07ncoghlanlinkissue23188 messages
2015-01-10 11:13:07ncoghlancreate