v7.9.14
I have a function that I’ve changed (added in more mandatory arguments), and I’m not sure if I’ve modified every call to it in my project (since you can’t find and replace within global templates… ), so I want to raise an exception which i’ll handle by sending the traceback and context to me via email, in case an operator stumbles upon one that I potentially have missed. I’ve set default values to these extra arguments in the meantime so that the function will actually run to check and send the error.
I can get the traceback (not actually that useful in this instance), but I don’t know how to get the context of it so that I know what Window and component they called the script from.
How do I retrieve the context?
Notes:
- the function is defined in a shared script library
- the function doesn’t and didn’t previously accept the
event
, so I can’t usesystem.gui.getParentWindow