[PyQt] SIP exception question

Qin Shen jeanshen at tippett.com
Mon Oct 4 20:32:58 BST 2010


Hi there,

I had this SIP exception working a few months ago. Recently I've made some
structural changes to my code, it stopped working if I put the C++ throw()
call inside .cpp file instead of .h file.


in Entity.h:
-----------------
class Entity
{
 public:
    ...

    void test() const;

    ...
}


in Entity.cpp:
-------------------
void Entity::test() const
{
    throw SgError("Exception test!");
}



in Entity.sip:
-----------------
class Entity
{
    ...

    void test() const throw(SgError);
    ...
}

The SgError exception won't be caught unless I put function test()'s 
implementation
inside the .h file. I have no idea what have changed. In both cases, the 
SIP file
and the sip-generated C++ code stay unchanged.

Any help will be greatly appreciated.

Thanks,

-Jean





   

   





More information about the PyQt mailing list