exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit c62dc613ce44b9c671e9cc9328ceb0a078c4ca4e
parent 376183ac6a0f042235b75a76ea500bb74f270615
Author: Sree Harsha Totakura <sreeharsha@totakura.in>
Date:   Thu,  5 Mar 2015 17:55:19 +0100

db: Add QUERY_ERR macro to log failed queries

Diffstat:
Msrc/mint/mint_db.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/mint/mint_db.c b/src/mint/mint_db.c @@ -42,6 +42,9 @@ static pthread_key_t db_conn_threadlocal; +#define QUERY_ERR(result) \ + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s: query failed: %s\n", __FUNCTION__, PQresultErrorMessage (result)) + /** * Database connection string, as read from * the configuration. @@ -699,9 +702,7 @@ TALER_MINT_DB_reserve_get (PGconn *db, params); if (PGRES_TUPLES_OK != PQresultStatus (result)) { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Query failed: %s\n", - PQresultErrorMessage (result)); + QUERY_ERR (result); PQclear (result); return GNUNET_SYSERR; }