renderer returning an errored deferred makes the response hang
This page prints an error to the console, but the page never terminates. Rendering 'bar' behaves how I would expect-- an error page is shown in the browser. How can I cause error pages to display when any renderer errors (or even replace that renderer with a local error message)? Having my site hang is awkward for debugging. import sys from twisted.internet.defer import Deferred from twisted.internet import reactor from twisted.python import log from nevow.appserver import NevowSite from nevow import rend, loaders, tags as T import nevow class P(rend.Page): docFactory = loaders.stan(T.body[T.directive('foo')]) def render_foo(self, ctx, data): d = Deferred() def e(result): raise ValueError d.addCallback(e) d.callback(5) return d def render_bar(self, ctx, data): raise ValueError print nevow.__file__, nevow.__version__ log.startLogging(sys.stdout) reactor.listenTCP(8006, NevowSite(P())) reactor.run()
participants (1)
-
Drew Perttula