Message145560
Could you just cancel the chained exception?
>>> try: {}["asdf"]
... except KeyError:
... try: raise Exception()
... except Exception as x:
... x.__cause__ = None
... x.__context__ = None
... x.__traceback__ = None
... raise x
...
Traceback (most recent call last):
File "<stdin>", line 8, in <module>
Exception
in contrast to:
>>> try: {}["asdf"]
... except KeyError:
... try: raise e
... except Exception as x:
... raise x
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: 'asdf'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 5, in <module>
File "<stdin>", line 3, in <module>
File "<stdin>", line 8, in <module>
Exception |
|
Date |
User |
Action |
Args |
2011-10-14 20:05:14 | eric.snow | set | recipients:
+ eric.snow, rhettinger, ezio.melotti |
2011-10-14 20:05:14 | eric.snow | set | messageid: <1318622714.39.0.261065297397.issue13177@psf.upfronthosting.co.za> |
2011-10-14 20:05:13 | eric.snow | link | issue13177 messages |
2011-10-14 20:05:13 | eric.snow | create | |
|