Log message for revision 101854: Removed handling of string exceptions from ZPublisherExceptionHook and reverted the addition of Unauthorized exceptions to be always re-raised. This broke the tests.
Changed: U Zope/branches/2.12/doc/CHANGES.rst U Zope/branches/2.12/src/Zope2/App/startup.py -=- Modified: Zope/branches/2.12/doc/CHANGES.rst =================================================================== --- Zope/branches/2.12/doc/CHANGES.rst 2009-07-13 15:13:07 UTC (rev 101853) +++ Zope/branches/2.12/doc/CHANGES.rst 2009-07-13 15:14:03 UTC (rev 101854) @@ -39,7 +39,7 @@ - ObjectManagerNameChooser now also works with BTreeFolder2. -- Correctly handle unauthorized exceptions in the ZPublisherExceptionHook. +- Correctly handle exceptions in the ZPublisherExceptionHook. Zope 2.12.0 b2 (2009/05/27) --------------------------- Modified: Zope/branches/2.12/src/Zope2/App/startup.py =================================================================== --- Zope/branches/2.12/src/Zope2/App/startup.py 2009-07-13 15:13:07 UTC (rev 101853) +++ Zope/branches/2.12/src/Zope2/App/startup.py 2009-07-13 15:14:03 UTC (rev 101854) @@ -167,30 +167,25 @@ def __call__(self, published, REQUEST, t, v, traceback): try: - if isinstance(t, StringType): - if t.lower() in ('unauthorized', 'redirect'): - raise - else: - if (t is SystemExit or - issubclass(t, Redirect) or issubclass(t, Unauthorized)): - raise + if t is SystemExit or issubclass(t, Redirect): + raise + if issubclass(t, ConflictError): + self.logConflicts(v, REQUEST) + raise ZPublisher.Retry(t, v, traceback) + + if t is ZPublisher.Retry: + try: + v.reraise() + except: + # we catch the re-raised exception so that it gets + # stored in the error log and gets rendered with + # standard_error_message + t, v, traceback = sys.exc_info() if issubclass(t, ConflictError): - self.logConflicts(v, REQUEST) - raise ZPublisher.Retry(t, v, traceback) + # ouch, a user saw this conflict error :-( + self.unresolved_conflict_errors += 1 - if t is ZPublisher.Retry: - try: - v.reraise() - except: - # we catch the re-raised exception so that it gets - # stored in the error log and gets rendered with - # standard_error_message - t, v, traceback = sys.exc_info() - if issubclass(t, ConflictError): - # ouch, a user saw this conflict error :-( - self.unresolved_conflict_errors += 1 - try: log = aq_acquire(published, '__error_log__', containment=1) except AttributeError: _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins