@cherrypy.expose
@cherrypy.tools.mako(filename="/error.mako")
def error(self):
- #op, username, fields, err, emsg, traceback):
"""Print an error page when an exception occurs"""
op = cherrypy.request.prev.path_info
username = cherrypy.request.login
err = cherrypy.request.prev.params["err"]
emsg = cherrypy.request.prev.params["emsg"]
traceback = cherrypy.request.prev.params["traceback"]
- d = dict(op = op, user=username, fields=cherrypy.request.prev.params,
+ d = dict(op=op, user=username, fields=cherrypy.request.prev.params,
errorMessage=str(err), stderr=emsg, traceback=traceback)
error_raw = cherrypy.request.lookup.get_template("/error_raw.mako")
details = error_raw.render(**d)