[Zope] Display TraceBack in the standard_error_message
Dieter Maurer
dieter@handshake.de
Sat, 10 Feb 2001 14:33:35 +0100 (CET)
Olivier Deckmyn writes:
> I wonder how I can display error traceback inside standard_error_message (in
> fact, it's only to automatically email it in case of error, with REQUEST,
> errortype, etc...)
> ...
> I need to display/use it through a <dtml-var xxx> tag, so that I can insert
> it in the body of my debug email.
Not too easy.
The traceback is generated by "RESPONSE._traceback".
As you see, it has an "_" prepended, thus you can not
use it from DTML.
There is also a "RESPONSE.exception", but it modifies
the response body directly.
You could try to create an external method that
has "RESPONSE" as parameter and returns
"apply(RESPONSE._traceback,sys.info())".
Dieter