hi all, how do i create my own standard_error_message with my own header and footer? thanks! __________________________________________________________________ Gesendet von Yahoo! Mail - http://mail.yahoo.de Bis zu 100 MB Speicher bei http://premiummail.yahoo.de
1. Create a new method 2. Call it standard_error_message 3. Incorporate whatever header, footer, and other stuff you want. One thing to bear in mind when you create your own error messages: test the heck out of what you're using. If your error messages causes errors, you'll clobber your original exception and will have much more difficulty obtaining a decent traceback. HTH, Dylan At 05:00 PM 2/9/2003, Sungmook Kim wrote:
hi all,
how do i create my own standard_error_message with my own header and footer?
thanks!
__________________________________________________________________
Gesendet von Yahoo! Mail - http://mail.yahoo.de Bis zu 100 MB Speicher bei http://premiummail.yahoo.de
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Hi, I did the things you've told me to but am facing a problem: all the error messages are shown outside of my header and footer my standard_error_message page looks roughly like this: <dtml-my_header> the one example shown in the how-to. <dtml-my_footer> how can i get all the messages inside my header and footer? cheers --- Dylan Reinhardt <zope@dylanreinhardt.com> schrieb: > 1. Create a new method
2. Call it standard_error_message 3. Incorporate whatever header, footer, and other stuff you want.
One thing to bear in mind when you create your own error messages: test the heck out of what you're using. If your error messages causes errors, you'll clobber your original exception and will have much more difficulty obtaining a decent traceback.
HTH,
Dylan
At 05:00 PM 2/9/2003, Sungmook Kim wrote:
hi all,
how do i create my own standard_error_message with my own header and footer?
thanks!
__________________________________________________________________
Gesendet von Yahoo! Mail - http://mail.yahoo.de Bis zu 100 MB Speicher bei
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
__________________________________________________________________ Gesendet von Yahoo! Mail - http://mail.yahoo.de Bis zu 100 MB Speicher bei http://premiummail.yahoo.de
At 11:10 AM 2/10/2003, Sungmook Kim wrote:
my standard_error_message page looks roughly like this:
<dtml-my_header> the one example shown in the how-to. <dtml-my_footer>
You've got a mixture of two different DTML syntaxes going on there. You can express a call to my_method as <dtml-var my_method> or &dtml-my_method; but what you have above won't work. Note that this is a DTML syntax issue and really has nothing to do with error messages or headers. Try: <dtml-var my_header> Page contents, etc. <dtml-var my_footer> If that doesn't do the trick, it would help to know more about your setup, what you're trying and exactly what results (or errors) you're getting. HTH, Dylan
oh, my bad. there was a typo. i meant <dtml-var my_header> and <dtml-var my_footer> but the problem is that the content of the error message is outside my header and footer. it's exactly like this: <dtml-var my_header> <td style="border-top-width:2px; border-bottom-width:2px; border-top-color:#336633; border-bottom-color:#336633; border-top-style:solid; border-bottom-style:solid;" valign="top" width="580" bgcolor="#FFFFFF"> <dtml-if error_message> <dtml-var error_message> <dtml-else> <TABLE BORDER="0" WIDTH="100%"> <TR VALIGN="TOP"> <TD WIDTH="10%" ALIGN="CENTER"> <IMG SRC="<dtml-var BASE1>/p_/ZButton" ALT="Zope"> </TD> <TD WIDTH="90%"> <H2>Zope Error</H2> <P>Zope has encountered an error while publishing this resource. </P> <P> <STRONG>Error Type: <dtml-var error_type></STRONG><BR> <STRONG>Error Value: <dtml-var error_value></STRONG><BR> </P> <HR NOSHADE> <P>Troubleshooting Suggestions</P> <UL> <dtml-if "error_type in ('KeyError','NameError')"> <LI>This resource may be trying to reference a nonexistent object or variable <STRONG><dtml-var error_value></STRONG>.</LI> </dtml-if> <LI>The URL may be incorrect.</LI> <LI>The parameters passed to this resource may be incorrect.</LI> <LI>A resource that this resource relies on may be encountering an error.</LI> </UL> <P>For more detailed information about the error, please refer to the HTML source for this page. </P> <P>If the error persists please contact the site maintainer. Thank you for your patience. </P> </TD></TR> </TABLE> <dtml-comment> Here, events like logging and other actions may also be performed, such as sending mail automatically to the administrator. </dtml-comment> </dtml-if> </td> <dtml-var my_footer> __________________________________________________________________ Gesendet von Yahoo! Mail - http://mail.yahoo.de Bis zu 100 MB Speicher bei http://premiummail.yahoo.de
So far so good... what are the values of my_header and my_footer and where are they located with respect to standard_error_message? At 01:38 PM 2/10/2003, Sungmook Kim wrote:
oh, my bad. there was a typo. i meant <dtml-var my_header> and <dtml-var my_footer> but the problem is that the content of the error message is outside my header and footer.
it's exactly like this:
<dtml-var my_header> <td style="border-top-width:2px; border-bottom-width:2px; border-top-color:#336633; border-bottom-color:#336633; border-top-style:solid; border-bottom-style:solid;" valign="top" width="580" bgcolor="#FFFFFF"> <dtml-if error_message> <dtml-var error_message> <dtml-else>
<TABLE BORDER="0" WIDTH="100%"> <TR VALIGN="TOP">
<TD WIDTH="10%" ALIGN="CENTER"> <IMG SRC="<dtml-var BASE1>/p_/ZButton" ALT="Zope"> </TD>
<TD WIDTH="90%"> <H2>Zope Error</H2> <P>Zope has encountered an error while publishing this resource. </P>
<P> <STRONG>Error Type: <dtml-var error_type></STRONG><BR> <STRONG>Error Value: <dtml-var error_value></STRONG><BR> </P>
<HR NOSHADE>
<P>Troubleshooting Suggestions</P>
<UL> <dtml-if "error_type in ('KeyError','NameError')"> <LI>This resource may be trying to reference a nonexistent object or variable <STRONG><dtml-var error_value></STRONG>.</LI> </dtml-if> <LI>The URL may be incorrect.</LI> <LI>The parameters passed to this resource may be incorrect.</LI> <LI>A resource that this resource relies on may be encountering an error.</LI> </UL>
<P>For more detailed information about the error, please refer to the HTML source for this page. </P>
<P>If the error persists please contact the site maintainer. Thank you for your patience. </P> </TD></TR> </TABLE>
<dtml-comment> Here, events like logging and other actions may also be performed, such as sending mail automatically to the administrator. </dtml-comment>
</dtml-if> </td> <dtml-var my_footer>
__________________________________________________________________
Gesendet von Yahoo! Mail - http://mail.yahoo.de Bis zu 100 MB Speicher bei http://premiummail.yahoo.de
participants (3)
-
Dylan Reinhardt -
Martin Gebert -
Sungmook Kim