[Zope-Checkins] SVN: Zope/branches/2.12/src/ - moved special debug (== not handle_errors != debug mode) behavior up the stack

Yvo Schubbe y.2010 at wcm-solutions.de
Thu Apr 22 08:16:42 EDT 2010


Log message for revision 111262:
  - moved special debug (== not handle_errors != debug mode) behavior up the stack

Changed:
  U   Zope/branches/2.12/src/OFS/SimpleItem.py
  U   Zope/branches/2.12/src/ZPublisher/Publish.py

-=-
Modified: Zope/branches/2.12/src/OFS/SimpleItem.py
===================================================================
--- Zope/branches/2.12/src/OFS/SimpleItem.py	2010-04-22 11:37:30 UTC (rev 111261)
+++ Zope/branches/2.12/src/OFS/SimpleItem.py	2010-04-22 12:16:41 UTC (rev 111262)
@@ -235,14 +235,6 @@
             if not REQUEST:
                 REQUEST = aq_acquire(self, 'REQUEST')
 
-            handle_errors = getattr(getattr(REQUEST, 'RESPONSE', None),
-                                    'handle_errors', False)
-            if not handle_errors:
-                # If we have been asked not to handle errors don't even bother
-                # with transforming the exception into HTML. Just re-raise the
-                # original exception right away.
-                raise error_type, error_value, tb
-
             try:
                 s = aq_acquire(client, 'standard_error_message')
 

Modified: Zope/branches/2.12/src/ZPublisher/Publish.py
===================================================================
--- Zope/branches/2.12/src/ZPublisher/Publish.py	2010-04-22 11:37:30 UTC (rev 111261)
+++ Zope/branches/2.12/src/ZPublisher/Publish.py	2010-04-22 12:16:41 UTC (rev 111262)
@@ -153,7 +153,8 @@
                 getattr(cl,'__name__',cl), val,
                 debug_mode and compact_traceback()[-1] or ''))
 
-        if err_hook is not None:
+        # debug is just used by tests (has nothing to do with debug_mode!)
+        if not debug and err_hook is not None:
             retry = False
             if parents:
                 parents=parents[0]



More information about the Zope-Checkins mailing list