def handle_exception(self, exception, debug_mode):
    self.error(500)
    logging.exception(exception)
    if debug_mode:
      lines = ''.join(traceback.format_exception(*sys.exc_info()))
      self.response.clear()
      self.response.out.write('<pre>%s</pre>' % (cgi.escape(lines, quote=True)))
Called if this handler throws an exception during execution.
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/ext/webapp/__init__.py/RequestHandler.handle_exception