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