Commit 95f9afd9 authored by Jim Fulton's avatar Jim Fulton

Don't try to handle errors anymore. Let the publisher error hook take

care of it.
parent e7d1dcad
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""DTML Document objects.""" """DTML Document objects."""
__version__='$Revision: 1.29 $'[11:-2] __version__='$Revision: 1.30 $'[11:-2]
from DocumentTemplate.DT_Util import InstanceDict, TemplateDict from DocumentTemplate.DT_Util import InstanceDict, TemplateDict
from ZPublisher.Converters import type_converters from ZPublisher.Converters import type_converters
from Globals import HTML, HTMLFile, MessageDialog from Globals import HTML, HTMLFile, MessageDialog
...@@ -162,13 +162,9 @@ class DTMLDocument(PropertyManager, DTMLMethod): ...@@ -162,13 +162,9 @@ class DTMLDocument(PropertyManager, DTMLMethod):
r=apply(HTML.__call__, (self, bself, REQUEST), kw) r=apply(HTML.__call__, (self, bself, REQUEST), kw)
if RESPONSE is None: return r if RESPONSE is None: return r
return decapitate(r, RESPONSE) return decapitate(r, RESPONSE)
try:
r=apply(HTML.__call__, (self, (client, bself), REQUEST), kw) r=apply(HTML.__call__, (self, (client, bself), REQUEST), kw)
if type(r) is not type(''): return r if type(r) is not type(''): return r
except:
if self.id()=='standard_error_message':
raise sys.exc_type, sys.exc_value, sys.exc_traceback
return self.raise_standardErrorMessage(client, REQUEST)
if RESPONSE is None: return r if RESPONSE is None: return r
hh=RESPONSE.headers.has_key hh=RESPONSE.headers.has_key
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""DTML Method objects.""" """DTML Method objects."""
__version__='$Revision: 1.31 $'[11:-2] __version__='$Revision: 1.32 $'[11:-2]
from Globals import HTML, HTMLFile, MessageDialog from Globals import HTML, HTMLFile, MessageDialog
from string import join,split,strip,rfind,atoi,lower from string import join,split,strip,rfind,atoi,lower
...@@ -142,15 +142,8 @@ class DTMLMethod(cDocument, HTML, Acquisition.Implicit, RoleManager, ...@@ -142,15 +142,8 @@ class DTMLMethod(cDocument, HTML, Acquisition.Implicit, RoleManager,
if RESPONSE is None: return r if RESPONSE is None: return r
return decapitate(r, RESPONSE) return decapitate(r, RESPONSE)
try:
r=apply(HTML.__call__, (self, client, REQUEST), kw) r=apply(HTML.__call__, (self, client, REQUEST), kw)
if type(r) is not type(''): return r if type(r) is not type(''): return r
except:
if self.id()=='standard_error_message':
raise sys.exc_type, sys.exc_value, sys.exc_traceback
return self.raise_standardErrorMessage(client, REQUEST)
if RESPONSE is None: return r if RESPONSE is None: return r
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
This product provides support for external methods, which allow This product provides support for external methods, which allow
domain-specific customization of web environments. domain-specific customization of web environments.
""" """
__version__='$Revision: 1.30 $'[11:-2] __version__='$Revision: 1.31 $'[11:-2]
from Acquisition import Explicit from Acquisition import Explicit
from Globals import Persistent, HTMLFile, MessageDialog, HTML from Globals import Persistent, HTMLFile, MessageDialog, HTML
import OFS.SimpleItem import OFS.SimpleItem
...@@ -243,7 +243,6 @@ class ExternalMethod(OFS.SimpleItem.Item, Persistent, Explicit, ...@@ -243,7 +243,6 @@ class ExternalMethod(OFS.SimpleItem.Item, Persistent, Explicit,
__traceback_info__=args, kw, self.func_defaults __traceback_info__=args, kw, self.func_defaults
try:
try: return apply(f,args,kw) try: return apply(f,args,kw)
except TypeError, v: except TypeError, v:
tb=sys.exc_traceback tb=sys.exc_traceback
...@@ -255,8 +254,6 @@ class ExternalMethod(OFS.SimpleItem.Item, Persistent, Explicit, ...@@ -255,8 +254,6 @@ class ExternalMethod(OFS.SimpleItem.Item, Persistent, Explicit,
raise TypeError, v, tb raise TypeError, v, tb
finally: tb=None finally: tb=None
except:
self.raise_standardErrorMessage()
def function(self): return self._function def function(self): return self._function
......
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