[Zope3-checkins] SVN: Zope3/branches/3.2/ Merge revision 40990 from
trunk.
Stephan Richter
srichter at cosmos.phy.tufts.edu
Tue Jan 3 12:50:10 EST 2006
Log message for revision 41101:
Merge revision 40990 from trunk.
Changed:
U Zope3/branches/3.2/doc/CHANGES.txt
A Zope3/branches/3.2/src/zope/app/exception/browser/SETUP.cfg
U Zope3/branches/3.2/src/zope/app/exception/browser/configure.zcml
A Zope3/branches/3.2/src/zope/app/exception/browser/exception-ftesting.zcml
U Zope3/branches/3.2/src/zope/app/exception/browser/ftests.py
U Zope3/branches/3.2/src/zope/app/exception/browser/systemerror.txt
-=-
Modified: Zope3/branches/3.2/doc/CHANGES.txt
===================================================================
--- Zope3/branches/3.2/doc/CHANGES.txt 2006-01-03 17:48:40 UTC (rev 41100)
+++ Zope3/branches/3.2/doc/CHANGES.txt 2006-01-03 17:50:09 UTC (rev 41101)
@@ -35,12 +35,15 @@
Bug Fixes
+ - Fixed a nasty bug that was hiding ``INotFoundError`` exceptions behind
+ an empty page.
+
- Added input buffering to the twisted integration
- Fixed the plumbing in ZServer so that attempts to return large
output efficiently using iterators can actually succeed.
- - Uodated to a new version of twisted that fixes a bug in
+ - Updated to a new version of twisted that fixes a bug in
calling request bidy stream read methods without passing
arguments. http://www.zope.org/Collectors/Zope3-dev/521.
Copied: Zope3/branches/3.2/src/zope/app/exception/browser/SETUP.cfg (from rev 40990, Zope3/trunk/src/zope/app/exception/browser/SETUP.cfg)
Modified: Zope3/branches/3.2/src/zope/app/exception/browser/configure.zcml
===================================================================
--- Zope3/branches/3.2/src/zope/app/exception/browser/configure.zcml 2006-01-03 17:48:40 UTC (rev 41100)
+++ Zope3/branches/3.2/src/zope/app/exception/browser/configure.zcml 2006-01-03 17:50:09 UTC (rev 41101)
@@ -11,6 +11,14 @@
/>
<page
+ for="zope.exceptions.INotFoundError"
+ name="index.html"
+ template="systemerror.pt"
+ class="..systemerror.SystemErrorView"
+ permission="zope.Public"
+ />
+
+ <page
for="zope.security.interfaces.IUnauthorized"
name="index.html"
permission="zope.Public"
Copied: Zope3/branches/3.2/src/zope/app/exception/browser/exception-ftesting.zcml (from rev 40990, Zope3/trunk/src/zope/app/exception/browser/exception-ftesting.zcml)
Modified: Zope3/branches/3.2/src/zope/app/exception/browser/ftests.py
===================================================================
--- Zope3/branches/3.2/src/zope/app/exception/browser/ftests.py 2006-01-03 17:48:40 UTC (rev 41100)
+++ Zope3/branches/3.2/src/zope/app/exception/browser/ftests.py 2006-01-03 17:50:09 UTC (rev 41101)
@@ -17,7 +17,14 @@
"""
import unittest
from zope.app.testing import functional
+from zope.component.interfaces import ComponentLookupError
+class RaiseComponentLookupError(object):
+
+ def __call__(self):
+ raise ComponentLookupError()
+
+
class TestNotFound(functional.BrowserTestCase):
def testNotFound(self):
@@ -28,6 +35,7 @@
self.assert_(
'The page that you are trying to access is not available' in body)
+
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(TestNotFound),
Modified: Zope3/branches/3.2/src/zope/app/exception/browser/systemerror.txt
===================================================================
--- Zope3/branches/3.2/src/zope/app/exception/browser/systemerror.txt 2006-01-03 17:48:40 UTC (rev 41100)
+++ Zope3/branches/3.2/src/zope/app/exception/browser/systemerror.txt 2006-01-03 17:50:09 UTC (rev 41101)
@@ -59,4 +59,17 @@
A system error occurred.
...
+Another way of getting a system error is the occurrence of an
+``INotFoundError``, such as ``ComponentLookupError``. I have registered a
+simple view in ``exception-ftesting.zcml`` that will raise a component lookup
+error. So if we call ``componentlookuperror.html``, we should get the error
+message:
+ >>> print http(r"""
+ ... GET /componentlookuperror.html HTTP/1.1
+ ... """)
+ HTTP/1.1 500 Internal Server Error
+ ...
+ A system error occurred.
+ ...
+
More information about the Zope3-Checkins
mailing list