Re: [Zope] How to get nice traceback like from old versions?
Once more, correction of misformatted text for better readability. ----- Original Message ----- From: "Dieter Maurer" <dieter@handshake.de>
... It is the same as the event.log plus whole request. But with Zope 251 error log points me to exact code with problem: But 294 not:
The modern tracebacks are usually far more informative than the old ones.
True, they no longer show the source code but the "Module" info can easily be used to locate the corresponding source file. An the "line" info lets you find again the exact source code.
Sorry, but I dont see any line of used DTML method to produce this error. In fact, the error is at line 313 (this number is not present at traceback) of DTML method named "titulni": Traceback (innermost last): Module ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 41, in call_object Module OFS.DTMLMethod, line 144, in __call__ - <DTMLMethod at /www/index_html> - URL: http://xx/index_html/manage_main - Physical Path: /www/index_html Module DocumentTemplate.DT_String, line 476, in __call__ Module Products.unitws, line 21, in render Module OFS.DTMLDocument, line 121, in __call__ - <DTMLDocument at /www/index.htm> - URL: http://xx/index.htm/manage_main - Physical Path: /www/index.htm Module DocumentTemplate.DT_String, line 476, in __call__ Module OFS.DTMLMethod, line 137, in __call__ - <DTMLMethod at /www/standard_html_body> - URL: http://xx/standard_html_body/manage_main - Physical Path: /www/standard_html_body Module DocumentTemplate.DT_String, line 476, in __call__ Module DocumentTemplate.DT_With, line 76, in render Module DocumentTemplate.DT_With, line 76, in render Module DocumentTemplate.DT_Var, line 214, in render Module OFS.DTMLDocument, line 121, in __call__ - <DTMLDocument at /www/cz/kalendar/titulni> - URL: http://xx/cz/kalendar/titulni/manage_main - Physical Path: /www/cz/kalendar/titulni Module DocumentTemplate.DT_String, line 476, in __call__ Module Products.unitws, line 21, in render Module DocumentTemplate.DT_Util, line 196, in eval - __traceback_info__: REQUEST Module <string>, line 1, in <expression> NameError: name 'kalendar_titulni_pouze_akce_str' is not defined Line 313 where is the error looks: <dtml-call "REQUEST.set('akce', kalendar_titulni_pouze_akce_str)"> Is somewhere some extra product or patch to show partial code where is error? Thanks, JL.
Jaroslav Lukesh wrote at 2008-2-6 00:08 +0100:
Once more, correction of misformatted text for better readability. ... - __traceback_info__: REQUEST Module <string>, line 1, in <expression> NameError: name 'kalendar_titulni_pouze_akce_str' is not defined
Line 313 where is the error looks: <dtml-call "REQUEST.set('akce', kalendar_titulni_pouze_akce_str)">
Is somewhere some extra product or patch to show partial code where is error?
You are right: DTML is only rarely used nowadays and its support deteriorates. I do not know of a product or patch to improve on this (also I modified our local Zope to at least report which DTMLObject caused a problem). You can improve it by adding "__traceback_info__" or "__traceback_supplement__" definitions at strategic places in the DMTL implementation. -- Dieter
Dieter Maurer wrote:
Jaroslav Lukesh wrote at 2008-2-6 00:08 +0100:
Once more, correction of misformatted text for better readability. ... - __traceback_info__: REQUEST Module <string>, line 1, in <expression> NameError: name 'kalendar_titulni_pouze_akce_str' is not defined
Line 313 where is the error looks: <dtml-call "REQUEST.set('akce', kalendar_titulni_pouze_akce_str)">
Is somewhere some extra product or patch to show partial code where is error?
You are right: DTML is only rarely used nowadays and its support deteriorates.
I do not know of a product or patch to improve on this (also I modified our local Zope to at least report which DTMLObject caused a problem).
You can improve it by adding "__traceback_info__" or "__traceback_supplement__" definitions at strategic places in the DMTL implementation.
If anyone has done this, can I have a copy of your patch - I'm debugging on an old DTML product, and it is impossible to debug without line numbers of exceptions. Otherwise I might have to downgrade zope to 2.5 - thanks for that tip from Jaroslav Lukesh - I had no idea that it used to be better. Thanks, Robert (Jamie) Munro
participants (3)
-
Dieter Maurer -
Jaroslav Lukesh -
Robert (Jamie) Munro