Message371855
I belive the python traceback module was designed to produce the same output as the internal exception printer (sys.__excepthook__), but this is not the case when the exception's __str__ raises an exception.
Given an exception of the following class:
class E(Exception):
def __str__(self):
raise RuntimeError
Internal printer output:
Traceback (most recent call last):
File "inconsistent.py", line 6, in <module>
raise E()
__main__.E: <exception str() failed>
traceback.print_exc output:
Traceback (most recent call last):
File "inconsistent.py", line 6, in <module>
raise E()
E: <unprintable E object> |
|
Date |
User |
Action |
Args |
2020-06-19 08:54:18 | msimacek | set | recipients:
+ msimacek |
2020-06-19 08:54:18 | msimacek | set | messageid: <1592556858.95.0.825167658939.issue41031@roundup.psfhosted.org> |
2020-06-19 08:54:18 | msimacek | link | issue41031 messages |
2020-06-19 08:54:18 | msimacek | create | |
|