Package gavo :: Package web :: Module weberrors :: Class ErrorPage
[frames] | no frames]

Class ErrorPage

source code

                   object --+            
                            |            
       nevow.rend.DataFactory --+        
                                |        
                   object --+   |        
                            |   |        
     nevow.rend.RenderFactory --+        
                                |        
                   object --+   |        
                            |   |        
      nevow.rend.MacroFactory --+        
                                |        
                   object --+   |        
                            |   |        
 nevow.rend.ConfigurableMixin --+        
                                |        
              nevow.rend.Fragment --+    
                                    |    
   nevow.rend.ConfigurableFactory --+    
                                    |    
nevow.rend.FreeformChildMixin --+   |    
                                |   |    
      nevow.rend.ChildLookupMixin --+    
                                    |    
                      nevow.rend.Page --+
                                        |
                           object --+   |
                                    |   |
               common.CommonRenderers --+
                                        |
                                       ErrorPage
Known Subclasses:

A base for error handling pages.

The idea is that you set the "handles" class attribute to the exception you handle. The exception has to match exactly, i.e., no isinstancing is done.

You also must set status to the HTTP status code the error should return.

All error pages have a failure attribute that's a twisted failure with all the related mess (e.g., tracebacks).

You have the status and message data methods.

Instance Methods
 
__init__(self, error)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
data_status(self, ctx, data) source code
 
data_message(self, ctx, data) source code
 
render_beforeMessage(self, ctx, data) source code
 
render_afterMessage(self, ctx, data) source code
 
render_message(self, ctx, data) source code
 
render_hint(self, ctx, data) source code
 
render_rdlink(self, ctx, data) source code
 
render_titlemessage(self, ctx, data) source code
 
render_footer(self, ctx, data) source code
 
renderHTTP(self, ctx) source code

Inherited from nevow.rend.Page: __provides__, child_, flattenFactory, onPostFailure, onPostSuccess, rememberStuff, renderString, renderSynchronously, webFormPost

Inherited from nevow.rend.Fragment: get, remember, rend

Inherited from nevow.rend.DataFactory: __providedBy__, child

Inherited from nevow.rend.RenderFactory: render_data, render_mapping, render_sequence, render_string, render_xml, renderer

Inherited from nevow.rend.MacroFactory: macro

Inherited from nevow.rend.ConfigurableMixin: getBinding, getBindingNames, getDefault, postForm

Inherited from common.CommonRenderers: render_commonhead, render_getconfig, render_rootlink, render_unicode, render_urlescape

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Inherited from nevow.rend.ConfigurableFactory: configurable_, configurable_original, locateConfigurable

Inherited from nevow.rend.ChildLookupMixin: childFactory, locateChild, putChild

Inherited from nevow.rend.FreeformChildMixin: child_freeform_hand

Class Variables
  handles = None
hash(x)
  status = 500
  titleMessage = 'Unspecified Error'
  beforeMessage = 'We\'re sorry, but something didn\'t work out:'
  afterMessage = Tag('p', children=["This generic text shouldn't...
  docFactory = <gavo.web.common.doctypedStan object>
hash(x)

Inherited from nevow.rend.Page: __implemented__, addSlash, afterRender, beforeRender, buffered

Inherited from nevow.rend.Fragment: original

Inherited from nevow.rend.ChildLookupMixin: children

Properties

Inherited from object: __class__

Method Details

__init__(self, error)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

renderHTTP(self, ctx)

source code 
Overrides: nevow.rend.Page.renderHTTP

Class Variable Details

afterMessage

Value:
Tag('p', children=["This generic text shouldn't be here.  The child cl\
ass should override afterMessage."])