Jason Tackaberry wrote:
> On Wed, 2005-08-03 at 18:46 +0200, Dirk Meyer wrote:
>> How? I register to waht kind of exception? E.g. a handler should know
>> about all parts raising an exception and inner kaa parts don't know
>> about freevo exceptions.
>
> You can connect to the "exception" signal of a notifier object (i.e.
> anything derived from NotifierCallback, like Timer, SocketDispatcher).
> Any exception that occurs when the callback is called will be passed as
> an argument to callbacks connected to the exception signal.  If nothing
> is connected to the exception signal, then the exception propagates back
> up to the notifier loop as it normally would.

OK, I read your code and now I understand. Looks good to me. Can you
please update the source doc in the wiki?

And some comments: I guess I should remove the old callback style in
freevo for threads and replace it with signals (result and
exception). After that, I will do the same for popen. With the signals
I see no reason why I should a) give a callback at __init__ and b) why
I should subclass from process to get stdout and stderr. IMHO we
should have one interface to it and this are signals. 

About exceptions. First, why do you use sys.exc()[1]? You get the same
result with 'except Exception, e' and add 'e'. Or do I miss something?
Second, IMHO a not handled exception in one of the callbacks should
only remove the callback / timer from the loop, it should raise the
exception and the app should crash. A non handled exception is an
error! 


Dischi

-- 
Computer analyst to programmer: "You start coding. I'll go
find out what they want."

Attachment: pgpsjNbuuHRam.pgp
Description: PGP signature

Reply via email to