[PyQt] Python/C++ exception propagation
Arve Knudsen
arve.knudsen at gmail.com
Wed May 16 14:32:08 BST 2007
I have a question regarding the propagation of exceptions between Python and
C++ layers in a PyQt-based application. The thing is that I normally install
an outer except hook, in order to detect unexpected exceptions and inform
the user before closing down the application. As I found out, this does not
work in all cases however.
In a situation where I call Qt from Python which then invokes a callback in
Python, and the latter Python callback raises an exception, this exception
is swallowed before the call to Qt (from Python) finishes. Therefore the
outer Python block is not aware that an exception has happened, and goes
about its business before returning control to Qt. Is there any way with
PyQt to receive exceptions that has propagated to the event loop, and handle
them?
Arve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20070516/568402f7/attachment.html
More information about the PyQt
mailing list