Log message for revision 101883: Merged c101882 from 2.12 branch Changed: U Zope/trunk/src/Zope2/App/startup.py U Zope/trunk/src/Zope2/App/tests/testExceptionHook.py
-=- Modified: Zope/trunk/src/Zope2/App/startup.py =================================================================== --- Zope/trunk/src/Zope2/App/startup.py 2009-07-14 08:38:03 UTC (rev 101882) +++ Zope/trunk/src/Zope2/App/startup.py 2009-07-14 08:39:30 UTC (rev 101883) @@ -23,6 +23,7 @@ from App.config import getConfiguration from time import asctime from types import StringType, ListType +from zExceptions import upgradeException from zExceptions import Redirect from zExceptions import Unauthorized from ZODB.POSException import ConflictError @@ -167,8 +168,10 @@ def __call__(self, published, REQUEST, t, v, traceback): try: + t, v = upgradeException(t, v) + if t is SystemExit or issubclass(t, Redirect): - raise + raise t, v, traceback if issubclass(t, ConflictError): self.logConflicts(v, REQUEST) Modified: Zope/trunk/src/Zope2/App/tests/testExceptionHook.py =================================================================== --- Zope/trunk/src/Zope2/App/tests/testExceptionHook.py 2009-07-14 08:38:03 UTC (rev 101882) +++ Zope/trunk/src/Zope2/App/tests/testExceptionHook.py 2009-07-14 08:39:30 UTC (rev 101883) @@ -115,19 +115,21 @@ class ExceptionHookTest(ExceptionHookTestCase): def testStringException1(self): + from zExceptions import Unauthorized def f(): - raise 'unauthorized', 'x' + raise 'Unauthorized', 'x' if sys.version_info < (2, 6): - self.assertRaises('unauthorized', self.call, None, None, f) + self.assertRaises(Unauthorized, self.call, None, None, f) else: # Raising a string exception causes a TypeError on Python 2.6 self.assertRaises(TypeError, self.call, None, None, f) def testStringException2(self): + from zExceptions import Redirect def f(): - raise 'redirect', 'x' + raise 'Redirect', 'x' if sys.version_info < (2, 6): - self.assertRaises('redirect', self.call, None, None, f) + self.assertRaises(Redirect, self.call, None, None, f) else: # Raising a string exception causes a TypeError on Python 2.6 self.assertRaises(TypeError, self.call, None, None, f) _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins