On Fri, Jul 08, 2011 at 10:13:04AM +0200, Sébastien Petitdemange wrote:
> 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.
>
> 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
> };
Another point that may interfere: do you run SIP with the '-e'
option?
-e
Support for C++ exceptions is enabled. This causes all calls
to C++ code to be enclosed in try/catch blocks and C++ excep-
tions to be converted to Python exceptions. By default excep=
tion support is disabled.
Best regards, Jens
--
\ Jens Thoms Toerring ________ [email protected]
\_______________________________ http://toerring.de
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt