[issue23902] let exception react to being raised or the setting of magic properties (like __cause__) within Python

2022-01-10 Thread Irit Katriel
Change by Irit Katriel : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue23902] let exception react to being raised or the setting of magic properties (like __cause__) within Python

2022-01-01 Thread Irit Katriel
Irit Katriel added the comment: I think this proposal should be rejected. We cannot safely pass control back to python code in the midst of raising an exception. -- resolution: -> rejected status: open -> pending ___ Python tracker

[issue23902] let exception react to being raised or the setting of magic properties (like __cause__) within Python

2021-10-20 Thread Irit Katriel
Irit Katriel added the comment: > It seems sufficient to call a magic method on the exception immediately after > these the traceback/cause/context parameters have been set while it is being > raised What should happen if this callback raises an exception? -- nosy: +iritkatriel __

[issue23902] let exception react to being raised or the setting of magic properties (like __cause__) within Python

2015-04-09 Thread R. David Murray
R. David Murray added the comment: Can't you use a __setattr__ hook? Your use case seems pretty specialized. -- nosy: +r.david.murray ___ Python tracker ___

[issue23902] let exception react to being raised or the setting of magic properties (like __cause__) within Python

2015-04-09 Thread Travis Everett
New submission from Travis Everett: I've been working on a testing tool which raises its own exceptions from those thrown by code under test. The tool's exceptions do some analysis to categorize and add additional information to the underlying exceptions, and they need access to the __cause__