Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cannot use xbt_die when log layout format contains errors, since it uses log facilities.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 23 Oct 2012 13:44:01 +0000 (15:44 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 23 Oct 2012 13:58:09 +0000 (15:58 +0200)
Use fprintf(stderr) instead, then abort.

src/xbt/xbt_log_layout_format.c

index 9fe811b..e19302c 100644 (file)
@@ -88,7 +88,8 @@ static int xbt_log_layout_format_doit(xbt_log_layout_t l,
     handle_modifier:
       switch (*q) {
       case '\0':
-        xbt_die("Layout format (%s) ending with %%\n", (char *)l->data);
+        fprintf(stderr, "Layout format (%s) ending with %%\n", (char *)l->data);
+        xbt_abort();
       case '%':
         *p = '%';
         check_overflow(1);
@@ -196,7 +197,8 @@ static int xbt_log_layout_format_doit(xbt_log_layout_t l,
         break;
       }
       default:
-        xbt_die(ERRMSG, *q, (char *)l->data);
+        fprintf(stderr, ERRMSG, *q, (char *)l->data);
+        xbt_abort();
       }
     } else {
       *p = *q;