commit c88b585cfd93e2ba517b2b1a53375d9795c171e2
parent 3a8004330c4b0f11cf51b22aada57a9c6160b513
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 18 Jul 2021 14:26:08 +0200
-improve error reporting
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git 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);