Message76786
Looks to me like the display code is getting confused by the lack of a
non-None __context__ on the KeyError.
Perhaps the "raise ex from cause" syntax should be setting the
__context__ on the "cause" exception if it isn't already set?
Or else we could just special case this kind of weird programmer
behaviour in the display code.
=======================
>>> try:
... raise IOError
... except Exception as ex:
... ke = KeyError()
... ke.__context__ = ex
... raise AttributeError from ke
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
IOError
During handling of the above exception, another exception occurred:
KeyError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 6, in <module>
AttributeError
======================= |
|
Date |
User |
Action |
Args |
2008-12-02 21:17:51 | ncoghlan | set | recipients:
+ ncoghlan, barry, pitrou |
2008-12-02 21:17:51 | ncoghlan | set | messageid: <1228252671.54.0.213749577063.issue4486@psf.upfronthosting.co.za> |
2008-12-02 21:17:50 | ncoghlan | link | issue4486 messages |
2008-12-02 21:17:50 | ncoghlan | create | |
|