[Zope-Checkins] SVN: Zope/trunk/src/Zope2/App/startup.py Merged c101854 from 2.12 branch

Hanno Schlichting hannosch at hannosch.eu
Mon Jul 13 11:15:45 EDT 2009


Log message for revision 101855:
  Merged c101854 from 2.12 branch
  

Changed:
  U   Zope/trunk/src/Zope2/App/startup.py

-=-
Modified: Zope/trunk/src/Zope2/App/startup.py
===================================================================
--- Zope/trunk/src/Zope2/App/startup.py	2009-07-13 15:14:03 UTC (rev 101854)
+++ Zope/trunk/src/Zope2/App/startup.py	2009-07-13 15:15:44 UTC (rev 101855)
@@ -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:



More information about the Zope-Checkins mailing list