Björn Sandberg Lynch added the comment: 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. ---------- keywords: +patch Added file: http://bugs.python.org/file30895/traceback.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17911> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com