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 ncoghlan
Recipients Rotem Yaari, Yury.Selivanov, georg.brandl, gregory.p.smith, gvanrossum, larry, ncoghlan, oconnor663, serhiy.storchaka, vstinner, yselivanov
Date 2016-06-14.15:36:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1465918575.97.0.350411907333.issue25782@psf.upfronthosting.co.za>
In-reply-to
Content
> But fixing this issue by reordering the exception chain will only mask bugs that just better to be fixed.  And sometimes, this will cause weird exceptions chains, that will make *some* people spend a lot of time debugging/googling to understand what's going on.

Right, but the way to fix that is to figure out a more coherent linearisation strategy (and/or move away from linearisation by allowing __context__ to be a tuple). Both #18861 and the frame annotation idea it spawned in #19585 have some ideas on how we might be able to improve that situation.

Adding *yet another* exception to an already confused exception chain isn't likely to make it easier to debug, and may mask the original exception that triggered the misbehaving error handler (entirely defeating the point of adding exception chaining in the first place).

I'm not saying Serhiy's patch is the right long term solution - I'm saying I think it's a better short term mitigation measure, since it doesn't lose information the way nulling out the __context__ may do.
History
Date User Action Args
2016-06-14 15:36:16ncoghlansetrecipients: + ncoghlan, gvanrossum, georg.brandl, gregory.p.smith, vstinner, larry, Yury.Selivanov, serhiy.storchaka, yselivanov, oconnor663, Rotem Yaari
2016-06-14 15:36:15ncoghlansetmessageid: <1465918575.97.0.350411907333.issue25782@psf.upfronthosting.co.za>
2016-06-14 15:36:15ncoghlanlinkissue25782 messages
2016-06-14 15:36:15ncoghlancreate