From 0fef44159a13c6e031d3c4730b6d587099a15176 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 5 Jun 2016 22:03:09 +0200 Subject: improve error message to diagnose #4559 --- ChangeLog | 4 ++-- src/exchangedb/plugin_exchangedb_postgres.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 98e969005..c7ee8017f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,2 +1,2 @@ -Wed May 4 10:19:36 CEST 2016 - Releasing taler-exchange 0.0. -CG +Wed Jun 1 17:27:36 CEST 2016 + Releasing taler-exchange 0.0.0. -CG diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index 5fbaa26b3..aefe6dd13 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -35,7 +35,7 @@ * @param result PQ result object of the query that failed */ #define QUERY_ERR(result) \ - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Query failed at %s:%u: %s\n", __FILE__, __LINE__, PQresultErrorMessage (result)) + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Query failed at %s:%u: %s (%s)\n", __FILE__, __LINE__, PQresultErrorMessage (result), PQresStatus (PQresultStatus (result))) /** @@ -45,7 +45,7 @@ */ #define BREAK_DB_ERR(result) do { \ GNUNET_break (0); \ - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Database failure: %s\n", PQresultErrorMessage (result)); \ + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Database failure: %s (%s)\n", PQresultErrorMessage (result), PQresStatus (PQresultStatus (result))); \ } while (0) @@ -1972,8 +1972,8 @@ postgres_get_reserve_history (void *cls, }; result = GNUNET_PQ_exec_prepared (session->conn, - "reserves_in_get_transactions", - params); + "reserves_in_get_transactions", + params); if (PGRES_TUPLES_OK != PQresultStatus (result)) { QUERY_ERR (result); -- cgit v1.2.3