From fdce294120bc7d626321d38df46e4c49823310db Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 29 Aug 2021 09:44:52 -0600 Subject: [PATCH] [util/hb-subset] Print error and suggest filing github issue if operation fails https://github.com/harfbuzz/harfbuzz/issues/3173#issuecomment-906715780 --- util/batch.hh | 5 ++++- util/shape-options.hh | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/util/batch.hh b/util/batch.hh index 9543a0524..8c0217d8d 100644 --- a/util/batch.hh +++ b/util/batch.hh @@ -66,7 +66,10 @@ batch_main (int argc, char **argv) return ret; } - return main_t () (argc, argv); + int ret = main_t () (argc, argv); + if (report_status && ret != 0) + fprintf (stdout, "error: Operation failed. Probably a bug. File github issue.\n"); + return ret; } #endif diff --git a/util/shape-options.hh b/util/shape-options.hh index a87c9d48c..6484085af 100644 --- a/util/shape-options.hh +++ b/util/shape-options.hh @@ -108,7 +108,7 @@ struct shape_options_t if (!hb_shape_full (font, buffer, features, num_features, shapers)) { if (error) - *error = "all shapers failed."; + *error = "All shapers failed."; goto fail; } @@ -246,7 +246,7 @@ struct shape_options_t if (!hb_shape_full (font, fragment, features, num_features, shapers)) { if (error) - *error = "all shapers failed while shaping fragment."; + *error = "All shapers failed while shaping fragment."; hb_buffer_destroy (reconstruction); hb_buffer_destroy (fragment); return false;