Skip to content

Commit

Permalink
Reports: Don't crash when report generator fails without backtrace.
Browse files Browse the repository at this point in the history
  • Loading branch information
jralls committed Dec 16, 2023
1 parent 50ca650 commit 1da2464
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gnucash/report/gnc-report.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,20 @@ gnc_run_report_with_error_handling (gint report_id, gchar ** data, gchar **errms
*errmsg = NULL;
return TRUE;
}
else
else if (scm_is_string (captured_error))
{
*errmsg = gnc_scm_to_utf8_string (captured_error);
*data = NULL;
PWARN ("Error in report: %s", *errmsg);
return FALSE;
}
else
{
*data = nullptr;
PWARN("Report %s Failed to generate html but didn't raise a Scheme exception.",
gnc_report_name (report));
return FALSE;
}
}

gchar*
Expand Down

0 comments on commit 1da2464

Please sign in to comment.