[Twisted-web] Error output for bad deferred method signatures?

Lenny G Arbage alengarbage at yahoo.com
Thu Dec 1 09:28:09 MST 2005


Perfect.  This works as described, and your
explanation makes perfect sense.

I'm wondering though, if there is a way to do this
globally without specifying another errBack for every
deferred I call (which, right now numbers about 60 in
my little app)?  This would be useful for debugging
only, of course -- but that's where I'd like to save
the several hours trying to figure out why my
callbacks weren't firing for the next time I forget to
check that all err/callbacks have the correct
signatures.

  Thanks again,
  Lenny


--- Tommi Virtanen <tv at twistedmatrix.com> wrote:

> Lenny G Arbage wrote:
> > 'test(respOrErr, msg)'.  What isn't clear [to me]
> is
> > why this doesn't produce an error upon firing the
> > deferred, but instead produces an error when the
> > reactor shuts down [via ctrl-c], which could be
> hours
> > later.
> 
> It does. But as the error happens inside your
> Deferred
> chain, it will sit there waiting for an errback to
> be
> added, which would handle it. At shutdown you see
> debug
> output telling you forgot to handle errors in your
> Deferred chain.
> 
> Add d.addErrback(log.err) after all the other
> deferred
> handling and errors in the deferred chain will cause
> log
> output and will not get complained about.
> 
> _______________________________________________
> Twisted-web mailing list
> Twisted-web at twistedmatrix.com
>
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
> 



		
__________________________________ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free. 
http://music.yahoo.com/unlimited/



More information about the Twisted-web mailing list