[PyQt] SIP: newbie question 3

Sébastien Petitdemange sebastien.petitdemange at esrf.fr
Fri Jul 8 09:13:04 BST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Johan,

On 07/08/2011 09:58 AM, Johan Råde wrote:
> I tried adding the following directive to my sip file, but it seems to
> have no effect. There is still a crash when an exception is thrown in
> the C++ code.
> 
> 
> %Exception std::exception
> {
> %TypeHeaderCode
> #    include "../../Common.h"
> #    include "../../TextTable/Exceptions.h"
> %End
> %RaiseCode
>     SIP_BLOCK_THREADS
>     translate(sipExceptionRef)
>     SIP_UNBLOCK_THREADS
> %End
> };

Try this:

%Exception std::exception(SIP_Exception) /Default/
{
%TypeHeaderCode
#    include "../../Common.h"
#    include "../../TextTable/Exceptions.h"
%End
%RaiseCode
     SIP_BLOCK_THREADS
     translate(sipExceptionRef)
     SIP_UNBLOCK_THREADS
%End
};

Seb


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOFrwQAAoJEEtktDVosZgUtPMH/1U7BnrhC4oHYZ2k7/cBWASg
HxTGOwEnXWQKwbnpmZnyf83kEkPw1DXLpLCV2fweEbcLQib448IgJBWyceUY8x3G
H3J8ZPvtmm6qpK9+UDEzUzjEbpi6PTWaqbdIv8BA7/KHbjfAXNifP9NfrnbqS/ud
xBVsX4HrL8JoTCCUjrYuuFipc8goddBUzLEWtdytgCDPJlRR98hLslirMEnCoPNR
qNICCaO3QMazcpOFHX9I+4IbEtb+TwUKJhXj03RQbYzPs5MA8b0WjjPY7KXyRO36
2E24f9iSDn0D2Qsn//dHmDJNRQRIEESTWYRkWCr1abr+024SnshLx8HQtYp361Y=
=IUHE
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sebastien_petitdemange.vcf
Type: text/x-vcard
Size: 210 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110708/5b6b5ece/attachment.vcf>


More information about the PyQt mailing list