Reports: Don't crash when report generator fails without backtrace.

This commit is contained in:
John Ralls 2023-12-16 11:56:15 -08:00
parent 50ca650ad3
commit 1da2464577

View File

@ -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*