[Zope-Checkins] CVS: Packages/ZPublisher - HTTPResponse.py:1.47
Chris McDonough
chrism@zope.com
Tue, 7 Aug 2001 12:07:43 -0400
Update of /cvs-repository/Packages/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv26102
Modified Files:
HTTPResponse.py
Log Message:
Caused the error description associated with a notFound error to appear in the default traceback as "Reason: <error description>".
=== Packages/ZPublisher/HTTPResponse.py 1.46 => 1.47 ===
</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?