From d03e60d0aac4afc33862344908e3e3b833747a72 Mon Sep 17 00:00:00 2001 From: Alek Storm Date: Thu, 22 Sep 2011 02:41:37 +0000 Subject: [PATCH] Print only the template trace of the bottommost UI module call, move testing.LogHandler to util.LogCaptureHandler, and rename testing.LogTestCase to testing.LogCaptureTestCase --- tornado/template.py | 34 ++++++++++++++--------- tornado/test/template_test.py | 51 ++++++++++++++++++----------------- tornado/testing.py | 21 +-------------- tornado/util.py | 21 +++++++++++++++ 4 files changed, 71 insertions(+), 56 deletions(-) diff --git a/tornado/template.py b/tornado/template.py index bc131fb17..5d8993ba2 100644 --- a/tornado/template.py +++ b/tornado/template.py @@ -239,21 +239,31 @@ class Template(object): try: return execute() except Exception: - error_msg = "\n%s\n\n" - error_args = [_format_code(self.code).rstrip()] - if self.loader: - frames = traceback.extract_tb(sys.exc_info()[2]) - line_number = None - for filename, cur_line_number, function, text in frames: - match = re.match(r"\