Commit fa074cf7 authored by Shane Hathaway's avatar Shane Hathaway

Found and fixed the source of the "AttributeError: __error_log__" bug.

This code looks for the __error_log__ attribute in order to report an
error.  If it finds no such attribute, it reports the error in a
different way.  Unfortunately, the alternative branch was reporting
the exception that just happened to occur most recently, which is
irrelevant; it needs to report the error that was passed to it.
Fixed.
parent 81246863
......@@ -184,7 +184,8 @@ def zpublisher_exception_hook(published, REQUEST, t, v, traceback):
f=getattr(published, 'raise_standardErrorMessage', None)
if f is None:
published=getattr(published, 'aq_parent', None)
if published is None: raise
if published is None:
raise t, v, traceback
else:
break
......@@ -193,7 +194,8 @@ def zpublisher_exception_hook(published, REQUEST, t, v, traceback):
if getattr(client, 'standard_error_message', None) is not None:
break
client=getattr(client, 'aq_parent', None)
if client is None: raise
if client is None:
raise t, v, traceback
if REQUEST.get('AUTHENTICATED_USER', None) is None:
REQUEST['AUTHENTICATED_USER']=AccessControl.User.nobody
......
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