Commit c7aa5250 authored by Evan Simpson's avatar Evan Simpson

Don't catch string exceptions, since they can be used to control the repsonse code.

parent c85de7a8
...@@ -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.12 $'[11:-2] __version__='$Revision: 1.13 $'[11:-2]
import re, sys, ZTUtils import re, sys, ZTUtils
from MultiMapping import MultiMapping from MultiMapping import MultiMapping
...@@ -289,6 +289,8 @@ class Context: ...@@ -289,6 +289,8 @@ class Context:
except TALESError: except TALESError:
raise raise
except: except:
if type(sys.exc_info()[0]) is type(''):
raise
raise TALESError, (`expression`, sys.exc_info()), sys.exc_info()[2] 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