Commit 2e2c0a72 authored by Shane Hathaway's avatar Shane Hathaway

Made runtime exceptions more readable.

parent d87dd41e
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
HTML- and XML-based template objects using TAL, TALES, and METAL. HTML- and XML-based template objects using TAL, TALES, and METAL.
""" """
__version__='$Revision: 1.4 $'[11:-2] __version__='$Revision: 1.5 $'[11:-2]
import os, sys, traceback import os, sys, traceback
from TAL.TALParser import TALParser from TAL.TALParser import TALParser
...@@ -145,7 +145,7 @@ class PageTemplate: ...@@ -145,7 +145,7 @@ class PageTemplate:
output = StringIO() output = StringIO()
c = self.pt_getContext() c = self.pt_getContext()
c.update(extra_context) c.update(extra_context)
__traceback_info__ = c #__traceback_info__ = c
TALInterpreter(self._v_program, self._v_macros, TALInterpreter(self._v_program, self._v_macros,
getEngine().getContext(c), getEngine().getContext(c),
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
An implementation of a generic TALES engine An implementation of a generic TALES engine
""" """
__version__='$Revision: 1.3 $'[11:-2] __version__='$Revision: 1.4 $'[11:-2]
import re, sys import re, sys
from MultiMapping import MultiMapping from MultiMapping import MultiMapping
...@@ -255,7 +255,7 @@ class Context: ...@@ -255,7 +255,7 @@ class Context:
try: try:
return expression(self) return expression(self)
except: except:
raise TALESError, (`expression`, sys.exc_info()) raise TALESError, (`expression`, sys.exc_info()), sys.exc_info()[2]
evaluateValue = evaluate evaluateValue = evaluate
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment