r19430 - gnucash/trunk/src/report/report-system - Bug #624721: Show backtrace for errors in eguile templates

Christian Stimming cstim at code.gnucash.org
Sat Aug 14 16:48:06 EDT 2010


Author: cstim
Date: 2010-08-14 16:48:05 -0400 (Sat, 14 Aug 2010)
New Revision: 19430
Trac: http://svn.gnucash.org/trac/changeset/19430

Modified:
   gnucash/trunk/src/report/report-system/eguile-gnc.scm
Log:
Bug #624721: Show backtrace for errors in eguile templates

Patch by Matthijs Kooijman:

The current eguile template implementation catches errors that occur while
evaluating an eguile template. However, only the error is shown, not a
backtrace (so no location of the error either).

The attached patch modifies the error handling to also capture the stack
backtrace, using a lazy exception handler (e.g., capture the stack before
unwinding the stack to the real exception handler).

To extract only the relevant part of the stack (e.g., the part inside the
eguile template, not the tens of stack frames leading up to the report
rendering), a stack dump is made just before evaluating the eguile template (so
a sort of "diff" can be made).

For more details, see the extensive comments in the patch itself.



More information about the gnucash-patches mailing list