From 7c0fa4a1bc00a14db03a88e3d8d47bd41e2781d5 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Fri, 12 Nov 2021 14:22:16 +0000 Subject: enchant-lsmod.c: show provider error if any when request_dict fails This should prevent confusion such as that which led to https://github.com/AbiWord/enchant/issues/289 --- src/enchant-lsmod.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/enchant-lsmod.c b/src/enchant-lsmod.c index e8159c8..22c5560 100644 --- a/src/enchant-lsmod.c +++ b/src/enchant-lsmod.c @@ -103,7 +103,11 @@ main (int argc, char **argv) } else { EnchantDict *dict = enchant_broker_request_dict (broker, lang_tag); if (!dict) { - fprintf (stderr, "No dictionary available for '%s'\n", lang_tag); + fprintf (stderr, "No dictionary available for '%s'", lang_tag); + const char *errmsg = enchant_broker_get_error (broker); + if (errmsg != NULL) + fprintf (stderr, ": %s", errmsg); + putc('\n', stderr); retcode = 1; } else { enchant_dict_describe (dict, -- cgit v1.2.1