[Zope-Checkins] CVS: Releases/Zope/lib/python/ZPublisher - BeforeTraverse.py:1.7.14.1
Evan Simpson
evan@zope.com
Tue, 12 Mar 2002 13:31:52 -0500
Update of /cvs-repository/Releases/Zope/lib/python/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv26535
Modified Files:
Tag: Zope-2_5-branch
BeforeTraverse.py
Log Message:
Log instead of failing on broken multihooks.
=== Releases/Zope/lib/python/ZPublisher/BeforeTraverse.py 1.7 => 1.7.14.1 ===
"""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)