aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-05-16 09:53:34 +0200
committerChristian Grothoff <christian@grothoff.org>2017-05-16 11:05:01 +0200
commit82cec70298c56188ae7ff3caabc1d39d5916ddc9 (patch)
tree2bdfbf9b4698a57f9fbe975b50ecc08e556cece1 /src
parent9916eef3dbb22ba0be8268d0e8bfa6ca5372d756 (diff)
nicer error reporting
Diffstat (limited to 'src')
-rw-r--r--src/bank-lib/test_bank_interpreter.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/bank-lib/test_bank_interpreter.c b/src/bank-lib/test_bank_interpreter.c
index 94b3b0e51..e966424ef 100644
--- a/src/bank-lib/test_bank_interpreter.c
+++ b/src/bank-lib/test_bank_interpreter.c
@@ -374,7 +374,8 @@ print_expected (struct History *h,
(unsigned long long) h[i].serial_id,
h[i].details.wire_transfer_subject,
acc);
- GNUNET_free_non_null (acc);
+ if (NULL != acc)
+ free (acc);
}
}
@@ -563,8 +564,8 @@ history_cb (void *cls,
{
uint64_t total;
struct History *h;
- GNUNET_break (0);
+ GNUNET_break (0);
total = build_history (is,
&h);
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -579,7 +580,7 @@ history_cb (void *cls,
}
is->ip++;
is->task = GNUNET_SCHEDULER_add_now (&interpreter_run,
- is);
+ is);
return;
}
if (GNUNET_OK !=
@@ -589,6 +590,19 @@ history_cb (void *cls,
details))
{
GNUNET_break (0);
+ {
+ char *acc;
+
+ acc = json_dumps (json,
+ JSON_COMPACT);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Result %u was `%s'\n",
+ (unsigned int) cmd->details.history.results_obtained,
+ acc);
+ if (NULL != acc)
+ free (acc);
+ }
+
cmd->details.history.failed = GNUNET_YES;
return;
}