|
|
|
|
@ -230,10 +230,17 @@ gnc_run_report_with_error_handling (gint report_id, gchar ** data, gchar **errms
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
*errmsg = scm_is_string (captured_error) ? gnc_scm_to_utf8_string (captured_error) :
|
|
|
|
|
constexpr const char* with_err = "Report %s failed to generate html: %s";
|
|
|
|
|
constexpr const char* without_err = "Report %s Failed to generate html but didn't raise a Scheme exception.";
|
|
|
|
|
auto scm_err = scm_is_string (captured_error) ? gnc_scm_to_utf8_string (captured_error) :
|
|
|
|
|
g_strdup ("");
|
|
|
|
|
|
|
|
|
|
if (scm_err && *scm_err)
|
|
|
|
|
*errmsg = g_strdup_printf (with_err, gnc_report_name (report), scm_err);
|
|
|
|
|
else
|
|
|
|
|
*errmsg = g_strdup_printf (without_err, gnc_report_name (report));
|
|
|
|
|
|
|
|
|
|
*data = nullptr;
|
|
|
|
|
PWARN ("Error in report: %s", *errmsg);
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|