[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: -nicer logging
From: |
gnunet |
Subject: |
[gnunet] branch master updated: -nicer logging |
Date: |
Wed, 28 Jul 2021 09:43:44 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 8175353f1 -nicer logging
8175353f1 is described below
commit 8175353f1f9966c0125b89a3cb3e3352de54a5ff
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Wed Jul 28 09:39:30 2021 +0200
-nicer logging
---
src/json/json_pack.c | 32 ++++++++++++++++++++++++++++----
1 file changed, 28 insertions(+), 4 deletions(-)
diff --git a/src/json/json_pack.c b/src/json/json_pack.c
index 88edaca5f..e104ad602 100644
--- a/src/json/json_pack.c
+++ b/src/json/json_pack.c
@@ -148,7 +148,13 @@ GNUNET_JSON_pack_object_steal (const char *name,
if (NULL == o)
return ps;
- GNUNET_assert (json_is_object (o));
+ if (! json_is_object (o))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Expected JSON object for field `%s'\n",
+ name);
+ GNUNET_assert (0);
+ }
return ps;
}
@@ -165,7 +171,13 @@ GNUNET_JSON_pack_object_incref (const char *name,
if (NULL == o)
return ps;
(void) json_incref (o);
- GNUNET_assert (json_is_object (o));
+ if (! json_is_object (o))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Expected JSON object for field `%s'\n",
+ name);
+ GNUNET_assert (0);
+ }
return ps;
}
@@ -181,7 +193,13 @@ GNUNET_JSON_pack_array_steal (const char *name,
if (NULL == a)
return ps;
- GNUNET_assert (json_is_array (a));
+ if (! json_is_array (a))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Expected JSON array for field `%s'\n",
+ name);
+ GNUNET_assert (0);
+ }
return ps;
}
@@ -198,7 +216,13 @@ GNUNET_JSON_pack_array_incref (const char *name,
if (NULL == a)
return ps;
(void) json_incref (a);
- GNUNET_assert (json_is_array (a));
+ if (! json_is_array (a))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Expected JSON array for field `%s'\n",
+ name);
+ GNUNET_assert (0);
+ }
return ps;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: -nicer logging,
gnunet <=