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 adaptivelogic
Recipients adaptivelogic, gvanrossum, ncoghlan, pitrou
Date 2013-07-11.21:15:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1373577337.77.0.796541765888.issue17911@psf.upfronthosting.co.za>
In-reply-to
Content
After thinking about it, I decided to defer instead of suppress line fetching. Suppressing would still give a traceback later, but not the same as the original.

extract_exception is where the meat is. There's a slight quirk in how context works - if cause is set to something else than the actual exception, context still gets set even though it won't be printed. This is to enable later analysis. However, if you explicitly 'raise Exception from None' neither of them will be set - the formatting code would have issues otherwise.

I'm not too happy about the code duplication between the format_exception method and the formatting that works on exceptions directly, but there are plenty of tests to ensure that the output is identical.

Feel free to dispute my naming choices. I'm admittedly influenced by twisted.
History
Date User Action Args
2013-07-11 21:15:38adaptivelogicsetrecipients: + adaptivelogic, gvanrossum, ncoghlan, pitrou
2013-07-11 21:15:37adaptivelogicsetmessageid: <1373577337.77.0.796541765888.issue17911@psf.upfronthosting.co.za>
2013-07-11 21:15:37adaptivelogiclinkissue17911 messages
2013-07-11 21:15:37adaptivelogiccreate