Skip to content

Commit 1da2464

Browse files
committed
Reports: Don't crash when report generator fails without backtrace.
1 parent 50ca650 commit 1da2464

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

gnucash/report/gnc-report.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,20 @@ gnc_run_report_with_error_handling (gint report_id, gchar ** data, gchar **errms
227227
*errmsg = NULL;
228228
return TRUE;
229229
}
230-
else
230+
else if (scm_is_string (captured_error))
231231
{
232232
*errmsg = gnc_scm_to_utf8_string (captured_error);
233233
*data = NULL;
234234
PWARN ("Error in report: %s", *errmsg);
235235
return FALSE;
236236
}
237+
else
238+
{
239+
*data = nullptr;
240+
PWARN("Report %s Failed to generate html but didn't raise a Scheme exception.",
241+
gnc_report_name (report));
242+
return FALSE;
243+
}
237244
}
238245

239246
gchar*

0 commit comments

Comments
 (0)