From: Bruno Haible Date: Tue, 2 Oct 2018 11:39:13 +0000 (+0200) Subject: cldr-plurals: Improve error handling. X-Git-Tag: v0.20~370 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68ed054681557ba2f3536a9181e6d2a283111b06;p=thirdparty%2Fgettext.git cldr-plurals: Improve error handling. * gettext-tools/src/cldr-plurals.c (extract_rules): Let libxml2 show errors. Don't assume that the error was an out-of-memory. --- diff --git a/gettext-tools/src/cldr-plurals.c b/gettext-tools/src/cldr-plurals.c index e2278511c..10c469ac0 100644 --- a/gettext-tools/src/cldr-plurals.c +++ b/gettext-tools/src/cldr-plurals.c @@ -55,10 +55,9 @@ extract_rules (FILE *fp, doc = xmlReadFd (fileno (fp), logical_filename, NULL, XML_PARSE_NONET | XML_PARSE_NOWARNING - | XML_PARSE_NOERROR | XML_PARSE_NOBLANKS); if (doc == NULL) - error (EXIT_FAILURE, 0, _("memory exhausted")); + error (EXIT_FAILURE, 0, _("Could not parse file %s as XML"), logical_filename); node = xmlDocGetRootElement (doc); if (!node || !xmlStrEqual (node->name, BAD_CAST "supplementalData"))