[Dev] Exceptions thrown into wxWidgets

Bryan Stearns stearns at osafoundation.org
Wed Apr 13 11:57:20 PDT 2005


Yesterday I tracked down another bug where an exception was hidden by wx:
- User caused wx to dispatch an event from C++ into our Python code 
(clicking something)
- Our python code threw an exception
- No exception handler caught the exception before the stack reentered 
C++, so it was never caught or logged

There was a brief in-person discussion about this problem last week, but 
I don't think any solution was discussed... so I'm bringing this up for 
discussion here:
- Is there a way wx can be fixed to handle this? (ultimately, its C++ 
code owns event dispatching - when it catches an exception from our 
Python code, should it return to our Python code which calls it, causing 
the program to exit, but maybe in a way where the exception could be 
logged?)
- Or is there something we should put in our code to deal with this (in 
_all_ the places where C++ code calls us? Ick!)
- Or is this not really a problem?

...Bryan



More information about the Dev mailing list