From 0e4fa46bdf8547034216cd37cfbb84d227a38bdb Mon Sep 17 00:00:00 2001 From: Derek Atkins Date: Sun, 25 May 2003 19:00:04 +0000 Subject: [PATCH] * src/report/utility-reports/view-column.scm: Catch errors when running the child reports so we display the failed report backtrace but also display an error and continue with the multicolumn report. Fixes #113668. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/1.8@8398 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 5 +++++ src/report/utility-reports/view-column.scm | 17 ++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a3ff72794e..fed77aad16 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,11 @@ Oops! That throws off all the numbers...) - Also print out any overpayment in the total column. + * src/report/utility-reports/view-column.scm: + Catch errors when running the child reports so we display the + failed report backtrace but also display an error and continue + with the multicolumn report. Fixes #113668. + 2003-05-24 Derek Atkins * src/gnome-utils/dialog-options.c: back out previous change. diff --git a/src/report/utility-reports/view-column.scm b/src/report/utility-reports/view-column.scm index bef16a6c54..b48bb72302 100644 --- a/src/report/utility-reports/view-column.scm +++ b/src/report/utility-reports/view-column.scm @@ -128,10 +128,21 @@ subreport (gnc:report-stylesheet report)) ;; render the report body ... hopefully this will DTRT + ;; if there is an error, then dump a backtrace and print + ;; an error message ;; and cache when it's ok to cache. - (gnc:html-table-cell-append-objects! - contents-cell (gnc:report-render-html subreport #f)) - + (if (not (gnc:backtrace-if-exception + (lambda () + (gnc:html-table-cell-append-objects! + contents-cell (gnc:report-render-html subreport #f)) + #t))) + (gnc:html-table-cell-append-objects! + contents-cell + (gnc:make-html-text + (string-append + "

" (_ "Report error") "

" + (_ "An error occurred while running the report."))))) + ;; increment the alloc number for each occupied row (let loop ((row current-row-num)) (let ((allocation (hash-ref column-allocs row)))