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 aronacher, catalin.iacob, draghuram, eric.araujo, ethan.furman, ezio.melotti, georg.brandl, mrabarnett, ncoghlan, pitrou, poke, rhettinger, steven.daprano
Date 2012-01-30.00:22:24
SpamBayes Score 8.59274e-10
Marked as misclassified No
Message-id <>
This was discussed a little more in the python-dev thread for PEP 409, but both Guido and I have been burned in the past by badly written libraries that replaced detailed exceptions that explained *exactly* what was going wrong with bland, generic "it broke!" exceptions that told us nothing. What should have been a 5 minute fix turns into a long bug hunt because useful information was being thrown away.

With __context__ always being set, all you need to do to cope with inappropriate use of "raise X from None" by libraries is write your own exception handler that always reports the entire exception chain, regardless of the __cause__ setting. If "raise X from None" actually *clobbers* the context, though, you instead have to go in and try to get hold of the detailed exception information *before* it gets clobbered (which is a lot harder to do).
Date User Action Args
2012-01-30 00:22:25ncoghlansetrecipients: + ncoghlan, georg.brandl, rhettinger, pitrou, draghuram, aronacher, ezio.melotti, eric.araujo, mrabarnett, steven.daprano, poke, ethan.furman, catalin.iacob
2012-01-30 00:22:25ncoghlansetmessageid: <>
2012-01-30 00:22:24ncoghlanlinkissue6210 messages
2012-01-30 00:22:24ncoghlancreate