If this error was caused by an uncaught exception, the
exception object can be found in kwargs e.g. kwargs['exception']
"""
- if self.settings.get("debug"):
+ if self.settings.get("debug") and "exception" in kwargs:
# in debug mode, try to send a traceback
self.set_header('Content-Type', 'text/plain')
return traceback.format_exc()
* Support for secure cookies written by pre-1.0 releases of Tornado has
been removed. The `RequestHandler.get_secure_cookie` method no longer
takes an ``include_name`` parameter.
+* The ``debug`` application setting now causes stack traces to be displayed
+ in the browser on uncaught exceptions. Since this may leak sensitive
+ information, debug mode is not recommended for public-facing servers.
New features
~~~~~~~~~~~~