[PyQt] Question about exception handling

Nyall Dawson nyall.dawson at gmail.com
Tue Sep 26 07:19:49 BST 2017


Hi list,

I'm seeking some clarification about exception handling in sip bindings.

I've hunted through the docs but can't find clear explanation about
how c++ exceptions are handled by Python subclasses. Specifically, if
I have:

- a c++ base class with a virtual method
- a Python subclass which implements this virtual method
- the Python method calls some c++ code, which throws a exception
which is NOT handled by the Python code.
- the exception is caught further up the c++ stack

What should happen here? Does this scenario leave Python in an unstable state?

Nyall


More information about the PyQt mailing list