[Zope] Traceback? Codechange!

Tino Wildenhain tino@wildenhain.de
Mon, 29 May 2000 15:43:35 +0200


Hi,

Marcus Collins wrote:
> 
> > -----Original Message-----
> > From: Chris Withers [mailto:chrisw@nipltd.com]
> > Sent: 29 May 2000 14:01
> > To: Martijn Pieters
> > Cc: Patrick J.M. Keane; zope@zope.org
> > Subject: Re: [Zope] Traceback?
> >
> > Martijn Pieters wrote:
> > > If you switch debug mode off, tracebacks will be included
> > > in error messages as HTML comments, thus rendering them
> > > invisible from the unsuspecting site visitor.
> >
> > Is that true even if you override standard_error_message?
> 
> I believe so, and empiracally this appears to be the case. From
> HTTPResponse.py:
> 
>     def _traceback(self,t,v,tb):
>         tb=self.format_exception(t,v,tb,200)
>         tb=join(tb,'\n')
>         tb=self.quoteHTML(tb)
>         if self.debug_mode: _tbopen, _tbclose = '<PRE>', '</PRE>'
>         else:               _tbopen, _tbclose = '<!--',  '-->'
>         return "\n%s\n%s\n%s" % (_tbopen, tb, _tbclose)
> 
> which is appended to the body of the error message when an exception occurs.

This is very ugly imho. It schould be sufficient, if one includes the
traceback-variable into the standard-error where its appropriate.
In the current implementation it will break the HTML-standard with
code outside <HTML></HTML> and additionally makes it impossible to get
error-messages to picky browsers, such as WAP-devices.

Is it ok if we remove these lines?

Do I have to copy this message to the collector and wait for 
a couple of months or can we do it instantly? ;-)

Regards
Tino Wildenhain