[Twisted-web] Error chanel in Nevow.Athena

Glyph Lefkowitz glyph at divmod.com
Sun Jul 19 20:08:18 EDT 2009


On Sun, Jul 19, 2009 at 6:55 PM, Juanjo Conti<jjconti at gmail.com> wrote:
> I have notice that when an error occur in a LiveElement (lost
> connection or not handled exception in the server) an error message is
> displayed in the browser. Is there an explicit way to use this error
> showing mechanism to display errors from my application? This stuff
> seems not covered in Athena documentation.

The error dialog you're noticing comes from
Nevow.Athena.PageWidget.showErrorDialog (which is defined in
Nevow/nevow/js/Nevow/Athena/__init__.js).

The PageWidget is the root JavaScript class that controls everything
that's going on on the page.  If you want to customize this, you
should subclass Nevow.Athena.PageWidget in your application, and
override showErrordDialog.  On the Python side of things, you need to
subclass nevow.athena.LivePage, and set your subclass's jsClass
attribute to the name of your PageWidget subclass.  I would not
recommend trying to implement everything PageWidget does itself, since
it does quite a lot and its interface isn't completely documented
anywhere.

This could definitely be better documented.  Can you contribute a
documentation patch that explains that stuff I just said? :-)



More information about the Twisted-web mailing list