Jason Tackaberry wrote: > On Wed, 2005-08-03 at 11:25 +0200, Dirk Meyer wrote: >> I saw something in the changelog. What did you do? > > I added an "exception" signal to the notifier classes. If there are > handlers attached to the signal, then exceptions will get caught and > passed to the handler. If any of the handlers return True then the > notifier object (Timer, Socket, whatever) is not removed from the > notifier, otherwise it is.
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. >> I guess exceptions are a bug in programming, so I don't see a reason >> why the app should not crash with the exception. > > Not really. Exceptions are error conditions, not bugs. For example, > when you open a file and the file is on an NFS mount that's having > problems, you'll get an IOError exception. You need to be able to > handle these things, not just crash. Yes, but I guess that should be inside a try/except. So | try: | # maybe this won't work | open() | except (IOError, OSError): | do_something_about_it Or do I miss something here? How could anything outside this part know about the exception and how to handle it? Dischi -- "I don't suffer from insanity. I enjoy every minute of it."
pgpQbkAO4zGTb.pgp
Description: PGP signature
