improve error message to diagnose #4559

This commit is contained in:
Christian Grothoff 2016-06-05 22:03:09 +02:00
parent 69756317cd
commit 0fef44159a
2 changed files with 6 additions and 6 deletions

View File

@ -1,2 +1,2 @@
Wed May 4 10:19:36 CEST 2016 Wed Jun 1 17:27:36 CEST 2016
Releasing taler-exchange 0.0. -CG Releasing taler-exchange 0.0.0. -CG

View File

@ -35,7 +35,7 @@
* @param result PQ result object of the query that failed * @param result PQ result object of the query that failed
*/ */
#define QUERY_ERR(result) \ #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 { \ #define BREAK_DB_ERR(result) do { \
GNUNET_break (0); \ 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) } while (0)