[Zope] Tracebacks in 2.6.0

Elena Schulz elena.schulz@gmx.net
Sat, 21 Dec 2002 14:36:42 +0100


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