Enable yaz backtrace for programs YAZ-802
[yaz-moved-to-github.git] / util / yaz-icu.c
index ceff120..1386a16 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2013 Index Data
+ * Copyright (C) Index Data
  * See the file LICENSE for details.
  */
 
@@ -26,6 +26,7 @@
 
 #include <yaz/icu.h>
 #include <yaz/wrbuf.h>
+#include <yaz/backtrace.h>
 
 /* commando line and config parameters */
 struct config_t {
@@ -454,8 +455,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);
     }
 
@@ -554,6 +553,7 @@ int main(int argc, char **argv)
 #if YAZ_HAVE_ICU
     struct config_t config;
 
+    yaz_enable_panic_backtrace(*argv);
     read_params(argc, argv, &config);
 
     if (config.conffile && strlen(config.conffile))