From ffb913afb48e3a0cb3539827daafed79562ab0b7 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 22 Nov 2013 14:12:07 +0100 Subject: [PATCH] Improve error reporting for ICU chains YAZ-707 Report config element+rule when ICU status is "failure". --- src/icu_chain.c | 5 ++++- util/yaz-icu.c | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/icu_chain.c b/src/icu_chain.c index ffbbb70..5ef9530 100644 --- a/src/icu_chain.c +++ b/src/icu_chain.c @@ -291,7 +291,7 @@ struct icu_chain *icu_chain_xml_config(const xmlNode *xml_node, if (!rule && strcmp((const char *) node->name, "display")) { - yaz_log(YLOG_WARN, "Missing attribute rule for element %s", + yaz_log(YLOG_WARN, "Missing attribute 'rule' for element %s", (const char *) node->name); no_errors++; continue; @@ -346,6 +346,9 @@ struct icu_chain *icu_chain_xml_config(const xmlNode *xml_node, } if (step && U_FAILURE(*status)) { + yaz_log(YLOG_WARN, "ICU Error %d %s for element %s, rule %s", + *status, u_errorName(*status), node->name, rule ? + rule : ""); no_errors++; break; } diff --git a/util/yaz-icu.c b/util/yaz-icu.c index ceff120..369982a 100644 --- a/util/yaz-icu.c +++ b/util/yaz-icu.c @@ -454,8 +454,6 @@ static void process_text_file(struct config_t *p_config) { printf("Could not set up ICU chain from config file '%s' \n", p_config->conffile); - if (!U_SUCCESS(status)) - printf("ICU Error: %d %s\n", status, u_errorName(status)); exit(1); } -- 1.7.10.4