--- a/thirdparty/google_appengine/google/appengine/ext/webapp/__init__.py Tue Jan 20 01:12:43 2009 +0000
+++ b/thirdparty/google_appengine/google/appengine/ext/webapp/__init__.py Tue Jan 20 13:19:45 2009 +0000
@@ -379,12 +379,11 @@
debug_mode: True if the web application is running in debug mode
"""
self.error(500)
- lines = ''.join(traceback.format_exception(*sys.exc_info()))
- logging.error(lines)
+ logging.exception(exception)
if debug_mode:
+ lines = ''.join(traceback.format_exception(*sys.exc_info()))
self.response.clear()
- self.response.headers['Content-Type'] = 'text/plain'
- self.response.out.write(lines)
+ self.response.out.write('<pre>%s</pre>' % (cgi.escape(lines, quote=True)))
@classmethod
def get_url(cls, *args, **kargs):