[Zope-Checkins] CVS: Packages/ZPublisher - HTTPResponse.py:1.46.20.1

Chris McDonough chrism@zope.com
Tue, 7 Aug 2001 12:09:31 -0400


Update of /cvs-repository/Packages/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv26171

Modified Files:
      Tag: Zope-2_4-branch
	HTTPResponse.py 
Log Message:
Made error description in default notFound error traceback visible as "Reason: <error description>".


=== Packages/ZPublisher/HTTPResponse.py 1.46 => 1.46.20.1 ===
 </HTML>""")
 
-    def notFoundError(self,entry='who knows!'):
+    def notFoundError(self,entry='Unknown'):
         self.setStatus(404)
         raise 'NotFound',self._error_html(
             "Resource not found",
-            "Sorry, the requested resource does not exist.<p>" +
-            "Check the URL and try again.<p>" +
-            "\n<!--\n%s\n-->" % entry)
+            "Sorry, the requested resource does not exist." +
+            "<p>Check the URL and try again.</p>" +
+            "<p><b>Reason:</b> %s</p>" % self.quoteHTML(entry))
 
     forbiddenError=notFoundError  # If a resource is forbidden,
                                   # why reveal that it exists?