Package mapproxy :: Package tms :: Module request :: Class TMSExceptionHandler
[hide private]
[frames] | no frames]

Class TMSExceptionHandler

source code

                      object --+        
                               |        
core.exceptions.ExceptionHandler --+    
                                   |    
 core.exceptions.XMLExceptionHandler --+
                                       |
                                      TMSExceptionHandler

Instance Methods [hide private]
Response
render(self, request_error)
Render the template of this exception handler.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  template_file = 'tms_exception.xml'
The filename of the jinja xml template
  mimetype = 'text/xml'
The mime type of the exception response.
  status_code = 404
The HTTP status code.
  env = Environment(loader= PackageLoader('mapproxy.tms', 'templ...
Jinja template environment.

Inherited from core.exceptions.XMLExceptionHandler: content_type

Properties [hide private]

Inherited from core.exceptions.XMLExceptionHandler: template

Inherited from object: __class__

Method Details [hide private]

render(self, request_error)

source code 
Render the template of this exception handler. Passes the request_error.message and request_error.code to the template.
Parameters:
  • request_error - the exception to render
Returns: Response
Overrides: core.exceptions.ExceptionHandler.render
(inherited documentation)

Class Variable Details [hide private]

env

Jinja template environment.
Value:
Environment(loader= PackageLoader('mapproxy.tms', 'templates'), trim_b\
locks= True)