parameters: (self)
return_statement: return json.dumps({'error':literal(resp.body)})
docstring: Render the error document
docstring_summary: Render the error document
docstring_tokens: Render the error document
function: def document(self):
          """Render the error document"""
          resp = request.environ.get('pylons.original_response')
  
          #content = literal(resp.body) or cgi.escape(request.GET.get('message', ''))
          #page = error_document_template % \
          #    dict(prefix=request.environ.get('SCRIPT_NAME', ''),
          #         code=cgi.escape(request.GET.get('code', str(resp.status_int))),
          #         message=content)
          
          response.content_type = 'application/json'
          return json.dumps({'error':literal(resp.body)})
function_tokens: def document ( self ) : resp = request . environ . get ( 'pylons.original_response' ) #content = literal(resp.body) or cgi.escape(request.GET.get('message', '')) #page = error_document_template % \ #    dict(prefix=request.environ.get('SCRIPT_NAME', ''), #         code=cgi.escape(request.GET.get('code', str(resp.status_int))), #         message=content) response . content_type = 'application/json' return json . dumps ( { 'error' : literal ( resp . body ) } )