summaryrefslogtreecommitdiff
path: root/src/pq/pq_result_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pq/pq_result_helper.c')
-rw-r--r--src/pq/pq_result_helper.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/pq/pq_result_helper.c b/src/pq/pq_result_helper.c
index c8b3b01fc..748ce0c29 100644
--- a/src/pq/pq_result_helper.c
+++ b/src/pq/pq_result_helper.c
@@ -72,11 +72,25 @@ extract_amount_nbo_helper (PGresult *result,
frac_name);
curr_num = PQfnumber (result,
curr_name);
- if ( (val_num < 0) ||
- (frac_num < 0) ||
- (curr_num < 0) )
+ if (val_num < 0)
{
- GNUNET_break (0);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Field `%s' does not exist in result\n",
+ val_name);
+ return GNUNET_SYSERR;
+ }
+ if (frac_num < 0)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Field `%s' does not exist in result\n",
+ frac_name);
+ return GNUNET_SYSERR;
+ }
+ if (curr_num < 0)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Field `%s' does not exist in result\n",
+ curr_name);
return GNUNET_SYSERR;
}
if ( (PQgetisnull (result,