aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-07-18 14:26:08 +0200
committerChristian Grothoff <christian@grothoff.org>2021-07-18 14:26:08 +0200
commitc88b585cfd93e2ba517b2b1a53375d9795c171e2 (patch)
tree65336b5e59990bed81f3d73eb803bcfcbefec344
parent3a8004330c4b0f11cf51b22aada57a9c6160b513 (diff)
downloadgnunet-c88b585cfd93e2ba517b2b1a53375d9795c171e2.tar.gz
gnunet-c88b585cfd93e2ba517b2b1a53375d9795c171e2.zip
-improve error reporting
-rw-r--r--src/json/json.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/json/json.c b/src/json/json.c
index 503702962..d55189804 100644
--- a/src/json/json.c
+++ b/src/json/json.c
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNUnet 2 This file is part of GNUnet
3 Copyright (C) 2014-2017 GNUnet e.V. 3 Copyright (C) 2014-2017, 2021 GNUnet e.V.
4 4
5 GNUnet is free software: you can redistribute it and/or modify it 5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published 6 under the terms of the GNU Affero General Public License as published
@@ -70,6 +70,11 @@ GNUNET_JSON_parse (const json_t *root,
70 { 70 {
71 if (NULL != error_json_name) 71 if (NULL != error_json_name)
72 *error_json_name = spec[i].field; 72 *error_json_name = spec[i].field;
73 else
74 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
75 "Parsing failed for field `%s:%u`\n",
76 spec[i].field,
77 i);
73 if (NULL != error_line) 78 if (NULL != error_line)
74 *error_line = i; 79 *error_line = i;
75 GNUNET_JSON_parse_free (spec); 80 GNUNET_JSON_parse_free (spec);