Message380364
The traceback is only one part of an exception. It is simply a list of frames that show where the exception travelled between being raised and being caught.
An exception contains information about an error, including the type of the exception, sometimes some parameters like an exception message, and sometimes a traceback.
When exception is just created and before it is ever raised, its traceback is None. But you can still print the rest of the information in it (its type and args).
I guess you're saying that the __context__ exception of the TypeError in your example has an empty traceback, which means it was never raised, which doesn't make sense because then how did it end up being the __context__ of another exception?
Yeah, __context__ is in a funny state, and the traceback module doesn't try to inspect it and interpret what you may have meant by doing that, it just prints the exception like it prints any other exception and you get a funny output.
I still don't a bug. |
|
Date |
User |
Action |
Args |
2020-11-04 21:27:46 | iritkatriel | set | recipients:
+ iritkatriel, Aaron.Meurer, asmeurer |
2020-11-04 21:27:46 | iritkatriel | set | messageid: <1604525266.3.0.464161338344.issue30384@roundup.psfhosted.org> |
2020-11-04 21:27:46 | iritkatriel | link | issue30384 messages |
2020-11-04 21:27:45 | iritkatriel | create | |
|