Commit 2f270a23 authored by Shane Hathaway's avatar Shane Hathaway

Added code to handle a failed BeforeTraverse hook gracefully.

parent 890d2833
......@@ -109,5 +109,11 @@ class NameCaller:
return
args = getattr(getattr(meth, 'func_code', None), 'co_argcount', 2)
apply(meth, (container, request, None)[:args])
try:
apply(meth, (container, request, None)[:args])
except:
from zLOG import LOG, ERROR
import sys
LOG('BeforeTraverse', ERROR,
'Error while invoking hook: "%s"' % self.name, error=
sys.exc_info())
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