[Zope] Modifying Standard Error Pages

John Chandler johnc@nipltd.com
Tue, 21 Mar 2000 14:24:47 +0000 (GMT)


I'm currently trying to modify Zope's standard error pages in order to
have errors (such as 404 not founds or DTML errors) e-mailed to the 
webmaster as they occur.

At first, I thought this would be as simple as modifying the
standard_error_message document found in the root of the Zope
installation, but it appears that changes to the file do not get displayed
(even after forced refreshes) and thus it doesn't seem to be in use.

A search on zope.org lead me to find the real error message embedded in
<zopedir>/lib/python/OFS/Application.py - I've modified this and it
appears to work, but doesn't support HTTP related errors such as 404s.

After a bit of a search, I've tracked down HTTP-related error reports to
<zopedir>/lib/python/ZPublisher/HTTPResponse.py but, while this can be
modified, it doesn't support DTML as the HTML error message is returned
without apparently being parsed by Zope. As a result, I can't have
dtml-sendmail send an error message report.

Okay, I could modify HTTPResponse.py to send a mail using something like
Python's smtplib, but before I do that, have I overlooked the obvious and
is there really a much cleaner, easier way to modify the error pages
without delving into the sources?

Thanks in advance!


John

--
 John Chandler  /  Software Developer  /  New Information Paradigms Ltd
   [ Linux in the office, AmigaOS in the home, PalmOS in the pocket ]
------------------------------------------------------------------------
 The opinions above aren't those of my company...
                           ...but then, they aren't really mine either.