[Dev] Exceptions thrown into wxWidgets
John Anderson
john at osafoundation.org
Wed Apr 13 12:11:37 PDT 2005
I also spend a several days tracking this down this exact problem a few
weeks ago. Robin says it is now probably possible to have Python
exception travel through C++, but that implementing it would be a big
job. Currenly Python exceptions are caught and printed on stderr when
the enter C++. As an alternative, I was thinking it would probably
pretty easy to generate a dialog when running the debug version of
Python, which would allow developers to find problems and testing the
debugging version of Chandler not to loose asserts.
John
Bryan Stearns wrote:
> 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
>
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> Open Source Applications Foundation "Dev" mailing list
> http://lists.osafoundation.org/mailman/listinfo/dev
More information about the Dev
mailing list