[PyQt] Re: Problem catching exception from SIP-wrapped function

Arve Knudsen arve.knudsen at gmail.com
Tue Sep 22 10:13:44 BST 2009

I should mention that to test, call the function do_raise in the 'raiser'
module. You should then see that there is an uncaught C++ exception.

On Mon, Sep 21, 2009 at 6:40 PM, Arve Knudsen <arve.knudsen at gmail.com>wrote:

> Hi
> I have run into this problem where a C++ exception is not correctly
> translated into Python on Linux (it works under VC++ on Windows). The
> exception is apparently not caught as it should, but looking at the
> SIP-generated sourcecode I cannot see why (there is a try/catch block for
> the exception). Any ideas as to what might be going wrong here? I have tried
> std::exception instead of my custom exception, and this gets translated
> correctly to Python.
> Attached I have a simple library 'raiser', which is wrapped by the Python
> module 'raiser'. In order to build it, first build a shared library from
> 'raiser.cpp', then run 'configure.py' and make.
> Thanks,
> Arve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090922/ca8edb5b/attachment.html

More information about the PyQt mailing list