[Zope] Tracebacks in 2.6.0
Kevin Carlson
khcarlso@bellsouth.net
Sat, 21 Dec 2002 11:12:59 -0500
Elena,
Thanks for the tip on HTTPResponse.py -- that will be great. I added the
error_tb a while back, but as you found this just isn't the same. Call me
nostalgic, but I sure miss my 2.5 error messages. :-)
Kevin
-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Elena
Schulz
Sent: Saturday, December 21, 2002 8:37 AM
To: zope@zope.org
Subject: [Zope] Tracebacks in 2.6.0
Hi Kevin,
I had the same problem and solved it like so:
go to the module: Zope_2_6\lib\python\ZPublisher\HTTPResponse.py
search for 'APPEND_TRACEBACKS = 0' and change it to '1' as the comment says.
There is a way to improve it further. You can get even the relevant bit of
the source-code in the concerned module by a nice extension written by
Anatoly Artamonov and called trace_bk.py. I am very happy with this and it
helps a lot of understanding the course of errors.
now I have my old 2.5. error-messages plus a bit more ;-).
You can even add <strong>Error error_tb: <dtml-var error_tb></strong><br> to
your standart_error_message to get even more information.
For that you have to change def _traceback in HTTPResponse.py like so:
def _traceback(self, t, v, tb, as_html=1):
#### Start 2 lines added for trace_bk
from Shared.trace_bk import new_tb
return new_tb(t,v,tb, self.debug_mode)
#### End: 2 lines added for trace_bk
tb = format_exception(t, v, tb, as_html=as_html)
return '\n'.join(tb)
-- hope you'll love it like me, Elena
_______________________________________________
Zope maillist - Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )