[Twisted-Python] global exception handler
Hello all, is there a possibility to have a global (application wide) exception handler in twisted application? I would like to stop application in case of any unhandled error in deferred callbacks. If application is run from twistd ..., is it correct to stop application like this? def quit(failure): log.err(str(failure)) reactor.callWhenRunning(reactor.stop) But the main problem is how to get this method called if exception is not handled by explicitly doing d.addErrback for each case. Zoran ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] global exception handler
On Thu, 2010-08-12 at 14:26 +0200, Zoran Bosnjak wrote: > Hello all, > is there a possibility to have a global (application wide) exception > handler in twisted application? I would like to stop application in case > of any unhandled error in deferred callbacks. Why not add an error handler yourself for these Deferreds? It is possible to get a function called for all unhandled errors by adding a log observer (http://twistedmatrix.com/documents/current/core/howto/logging.html#auto5) but this logging only happens on garbage collection of the Deferred, which means it can be delayed indefinitely in some cases. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] How to bisect Twisted?
On Wed, 11 Aug 2010 17:50 +0100, "Jonathan Lange" wrote: > On Wed, Aug 11, 2010 at 5:30 PM, Peter Westlake > wrote: > > In the Git version of the Twisted source code, there are tags for > > releases, e.g. the revision with SHA id > > 85a6a0f9e3c4ea22d1d72d4ca8eb0c08ee99ca85 corresponds to 8.0.0. This is > > good, but there aren't any intermediate changes on that branch (tag?), > > just the releases! So there isn't much for "git bisect" to work with. > > I'm trying to trace a bug that wasn't in 2.5.0 but is in 8.0.0; what > > arguments should I give to bisect? Apologies if this is obvious to > > anyone who knows how to use git, but I'm just a beginner. > > > > I don't know about git, but the way I'd do it in Bazaar is: > bzr bisect -r svn:19165..svn:23025 run
Re: [Twisted-Python] How to bisect Twisted?
On Thu, 12 Aug 2010 12:49 +1000, "Tim Allen" wrote: > On Wed, Aug 11, 2010 at 05:30:36PM +0100, Peter Westlake wrote: > > In the Git version of the Twisted source code, there are tags for > > releases, e.g. the revision with SHA id > > 85a6a0f9e3c4ea22d1d72d4ca8eb0c08ee99ca85 corresponds to 8.0.0. > > When you say "git version of the Twisted source code", do you mean the > official git described here? > > http://twistedmatrix.com/trac/wiki/GitMirror Yes, that's the one. > Do tags for the various Twisted releases show up if you run: > > git tag -l > > ? The only output is: svn/releases Looking at the repo with "gitk --all", that appears to be the name of a branch that is completely disconnected from all other revisions. Its first change has no parent. > > This is > > good, but there aren't any intermediate changes on that branch (tag?), > > just the releases! So there isn't much for "git bisect" to work with. > > I'm trying to trace a bug that wasn't in 2.5.0 but is in 8.0.0; what > > arguments should I give to bisect? Apologies if this is obvious to > > anyone who knows how to use git, but I'm just a beginner. > > I haven't used the official git mirror myself, but I have my own mirror > created with "git-svn". It looks like git-svn got very confused about > Twisted's release-tagging system; of all the tags I see listed at: > > http://twistedmatrix.com/trac/browser/tags > > ...the only thing in .git/refs/remotes/tags is the "releases" > subdirectory, which isn't actually a proper tag at all. > > So, uh, yeah, I'm stumped. > > If you *do* figure out what to do, though, feel free to add it to the > GitMirror wiki-page - or I'd be happy to write it up for you. Thanks! Jonathan's pointer to the list of revisions ought to be enough for me to start bisecting, and I'll try to figure out what's happening in Git as I go along. Thanks for the help, Peter. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python