From c88b585cfd93e2ba517b2b1a53375d9795c171e2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 18 Jul 2021 14:26:08 +0200 Subject: -improve error reporting --- src/json/json.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 @@ /* This file is part of GNUnet - Copyright (C) 2014-2017 GNUnet e.V. + Copyright (C) 2014-2017, 2021 GNUnet e.V. GNUnet is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published @@ -70,6 +70,11 @@ GNUNET_JSON_parse (const json_t *root, { if (NULL != error_json_name) *error_json_name = spec[i].field; + else + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Parsing failed for field `%s:%u`\n", + spec[i].field, + i); if (NULL != error_line) *error_line = i; GNUNET_JSON_parse_free (spec); -- cgit v1.2.3