Commit bc5a444b authored by Evan Simpson's avatar Evan Simpson

Log instead of failing on broken multihook

parent d3905a5d
...@@ -10,10 +10,12 @@ ...@@ -10,10 +10,12 @@
# FOR A PARTICULAR PURPOSE # FOR A PARTICULAR PURPOSE
# #
############################################################################## ##############################################################################
__version__='$Revision: 1.7 $'[11:-2] __version__='$Revision: 1.8 $'[11:-2]
"""BeforeTraverse interface and helper classes""" """BeforeTraverse interface and helper classes"""
from zLOG import LOG, ERROR
# Interface # Interface
def registerBeforeTraverse(container, object, app_handle, priority=99): def registerBeforeTraverse(container, object, app_handle, priority=99):
...@@ -96,7 +98,11 @@ class MultiHook: ...@@ -96,7 +98,11 @@ class MultiHook:
if prior is not None: if prior is not None:
prior(container, request) prior(container, request)
for cob in self._list: for cob in self._list:
cob(container, request) try:
cob(container, request)
except TypeError:
LOG('MultiHook', ERROR, '%s call %s failed.' % (
`self._hookname`, `cob`), error=sys.exc_info())
def add(self, cob): def add(self, cob):
self._list.append(cob) self._list.append(cob)
......
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