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