[PyQt] Problem with exception translation

Hans Meine meine at informatik.uni-hamburg.de
Tue Sep 14 11:21:40 BST 2010


On Tuesday 14 September 2010 11:51:09 Phil Thompson wrote:
> <meine at informatik.uni-hamburg.de> wrote:
> > Anyhow, now I found the /Default/ annotation, which is exactly what I
> > want. However, I get compile errors from the generated code; obviously,
> > the above %TypeHeaderCode is not inserted into every file using the above
> > default-catch block, so #include <exception> is missing and the build
> > fails.
> > 
> > At least the latter seems to be a clear bug to me, no?
> 
> In the above Foo doesn't have a %TypeHeaderCode block. I would expect that
> it's .h file would #include <exception>...
> 
> ...unless exceptions in a throw() can be only partially defined (like
> pointers to classes can)?

Ah, I see.  Don't know about the latter; actually, I only added throw(..) 
clauses to the .sip file in order to let SIP generate the try..catch.
My original header file still does not contain information about exceptions, 
so only the corresponding .cxx file #includes <exception>.

Maybe I abused SIP; in the meantime, I got used to specifying stuff quite 
differently in the .sip files than in the .h files.

Have a nice day,
  Hans


More information about the PyQt mailing list