[Zope-Checkins] CVS: Packages/ZPublisher - BeforeTraverse.py:1.8
Evan Simpson
evan@zope.com
Tue, 12 Mar 2002 13:32:45 -0500
Update of /cvs-repository/Packages/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv26648
Modified Files:
BeforeTraverse.py
Log Message:
Log instead of failing on broken multihook
=== Packages/ZPublisher/BeforeTraverse.py 1.7 => 1.8 ===
"""BeforeTraverse interface and helper classes"""
+from zLOG import LOG, ERROR
+
# Interface
def registerBeforeTraverse(container, object, app_handle, priority=99):
@@ -96,7 +98,11 @@
if prior is not None:
prior(container, request)
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):
self._list.append(cob)