[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] problem with exceptions within events
From:       Phil Thompson <phil () riverbankcomputing ! co ! uk>
Date:       2005-02-25 23:02:50
Message-ID: 200502252302.50983.phil () riverbankcomputing ! co ! uk
[Download RAW message or body]

On Friday 25 February 2005 3:33 pm, Ulrich Berning wrote:
> Phil Thompson schrieb:
> >>PyQt or any other extension wrapped with SIP could install an optional
> >>exception handler hook, that is called by SIP, indicating how to handle
> >>the exception (propagate to caller or use PyErr_Print()).
> >
> >It's PyErr_Print() that calls the hook, not the other way around. That
> >hook would have to be installed *after* any application installed hook.
> >Very messy.
>
> Sorry, I wasn't clear enough. I do not mean 'sys.excepthook' or any
> replacement. I mean a function implemented in PyQt called by SIP.
>
> SIP calls a method
> SIP checks if an exception has occured
> SIP checks, if the wrapped extension has installed a hook function (The
> module that provides exec_loop would do this)
> If not, SIP calls PyErr_Print() ==> End
> Otherwise SIP calls the hook funtion
> SIP either propagates the exception or calls PyErr_Print() depending on
> the return value of the hook function ==> End
>
> The hook function has to check, if one of the calling frames of the
> traceback frame contains the method exec_loop.
> Maybe I'm totally wrong with my idea.

I can think of a way to make this work - but it's too much of a change for 
a .1 release. I'll restore the old behaviour for the next snapshot (you'll 
have to re-build PyQt) and add it to the list of things for SIP v4.3.

Phil

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic