Commit 13d82a623d62120b3f4f89e33c1915d088291c7a

Thomas de Grivel 2024-11-27T13:23:28

remove error message in u_bits

diff --git a/libkc3/u.c.in b/libkc3/u.c.in
index 88c320a..cd96b02 100644
--- a/libkc3/u.c.in
+++ b/libkc3/u.c.in
@@ -116,8 +116,12 @@ u_bits$ * u_bits$_init_str (u_bits$ *u, const s_str *str)
   u_bits$ tmp = 0;
   buf_init_str_const(&buf, str);
   if (buf_parse_u_bits$(&buf, &tmp) <= 0) {
-    err_puts("u_bits$_init_str: buf_parse_u_bits$");
-    assert(! "u_bits$_init_str: buf_parse_u_bits$");
+    if (false) {
+      err_puts("u_bits$_init_str: buf_parse_u_bits$");
+      err_inspect_stacktrace(g_kc3_env.stacktrace);
+      err_write_1("\n");
+      assert(! "u_bits$_init_str: buf_parse_u_bits$");
+    }
     return NULL;
   }
   *u = tmp;
diff --git a/libkc3/u16.c b/libkc3/u16.c
index 43ea2af..a92f2fd 100644
--- a/libkc3/u16.c
+++ b/libkc3/u16.c
@@ -116,8 +116,12 @@ u16 * u16_init_str (u16 *u, const s_str *str)
   u16 tmp = 0;
   buf_init_str_const(&buf, str);
   if (buf_parse_u16(&buf, &tmp) <= 0) {
-    err_puts("u16_init_str: buf_parse_u16");
-    assert(! "u16_init_str: buf_parse_u16");
+    if (false) {
+      err_puts("u16_init_str: buf_parse_u16");
+      err_inspect_stacktrace(g_kc3_env.stacktrace);
+      err_write_1("\n");
+      assert(! "u16_init_str: buf_parse_u16");
+    }
     return NULL;
   }
   *u = tmp;
diff --git a/libkc3/u32.c b/libkc3/u32.c
index 5a4dc6d..a2ba402 100644
--- a/libkc3/u32.c
+++ b/libkc3/u32.c
@@ -116,8 +116,12 @@ u32 * u32_init_str (u32 *u, const s_str *str)
   u32 tmp = 0;
   buf_init_str_const(&buf, str);
   if (buf_parse_u32(&buf, &tmp) <= 0) {
-    err_puts("u32_init_str: buf_parse_u32");
-    assert(! "u32_init_str: buf_parse_u32");
+    if (false) {
+      err_puts("u32_init_str: buf_parse_u32");
+      err_inspect_stacktrace(g_kc3_env.stacktrace);
+      err_write_1("\n");
+      assert(! "u32_init_str: buf_parse_u32");
+    }
     return NULL;
   }
   *u = tmp;
diff --git a/libkc3/u64.c b/libkc3/u64.c
index c7d6c26..0e8bed3 100644
--- a/libkc3/u64.c
+++ b/libkc3/u64.c
@@ -116,8 +116,12 @@ u64 * u64_init_str (u64 *u, const s_str *str)
   u64 tmp = 0;
   buf_init_str_const(&buf, str);
   if (buf_parse_u64(&buf, &tmp) <= 0) {
-    err_puts("u64_init_str: buf_parse_u64");
-    assert(! "u64_init_str: buf_parse_u64");
+    if (false) {
+      err_puts("u64_init_str: buf_parse_u64");
+      err_inspect_stacktrace(g_kc3_env.stacktrace);
+      err_write_1("\n");
+      assert(! "u64_init_str: buf_parse_u64");
+    }
     return NULL;
   }
   *u = tmp;
diff --git a/libkc3/u8.c b/libkc3/u8.c
index 4de42ac..cf94c64 100644
--- a/libkc3/u8.c
+++ b/libkc3/u8.c
@@ -116,8 +116,12 @@ u8 * u8_init_str (u8 *u, const s_str *str)
   u8 tmp = 0;
   buf_init_str_const(&buf, str);
   if (buf_parse_u8(&buf, &tmp) <= 0) {
-    err_puts("u8_init_str: buf_parse_u8");
-    assert(! "u8_init_str: buf_parse_u8");
+    if (false) {
+      err_puts("u8_init_str: buf_parse_u8");
+      err_inspect_stacktrace(g_kc3_env.stacktrace);
+      err_write_1("\n");
+      assert(! "u8_init_str: buf_parse_u8");
+    }
     return NULL;
   }
   *u = tmp;
diff --git a/libkc3/uw.c b/libkc3/uw.c
index 8230885..c956226 100644
--- a/libkc3/uw.c
+++ b/libkc3/uw.c
@@ -116,8 +116,12 @@ uw * uw_init_str (uw *u, const s_str *str)
   uw tmp = 0;
   buf_init_str_const(&buf, str);
   if (buf_parse_uw(&buf, &tmp) <= 0) {
-    err_puts("uw_init_str: buf_parse_uw");
-    assert(! "uw_init_str: buf_parse_uw");
+    if (false) {
+      err_puts("uw_init_str: buf_parse_uw");
+      err_inspect_stacktrace(g_kc3_env.stacktrace);
+      err_write_1("\n");
+      assert(! "uw_init_str: buf_parse_uw");
+    }
     return NULL;
   }
   *u = tmp;