fix error reporting/handling
This commit is contained in:
parent
49f466df40
commit
6eb32a65bf
@ -1016,9 +1016,9 @@ create_wire_fee_for_method (void *cls,
|
||||
af->wire_fee.currency)) )
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"Invalid or missing amount in `%s' under `%s'\n",
|
||||
section,
|
||||
opt);
|
||||
"Invalid or missing amount for option `%s' in section `%s'\n",
|
||||
opt,
|
||||
section);
|
||||
*ret = GNUNET_SYSERR;
|
||||
GNUNET_free (opt);
|
||||
break;
|
||||
@ -1038,9 +1038,9 @@ create_wire_fee_for_method (void *cls,
|
||||
af->closing_fee.currency)) )
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"Invalid or missing amount in `%s' under `%s'\n",
|
||||
section,
|
||||
opt);
|
||||
"Invalid or missing amount for option `%s' in section `%s'\n",
|
||||
opt,
|
||||
section);
|
||||
*ret = GNUNET_SYSERR;
|
||||
GNUNET_free (opt);
|
||||
break;
|
||||
|
@ -827,8 +827,8 @@ exchange_serve_process_config (void)
|
||||
&TEH_master_public_key.
|
||||
eddsa_pub))
|
||||
{
|
||||
fprintf (stderr,
|
||||
"Invalid master public key given in exchange configuration.");
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"Invalid master public key given in exchange configuration.");
|
||||
GNUNET_free (master_public_key_str);
|
||||
return GNUNET_SYSERR;
|
||||
}
|
||||
@ -840,14 +840,18 @@ exchange_serve_process_config (void)
|
||||
|
||||
if (GNUNET_OK !=
|
||||
TEH_WIRE_init (TEH_cfg))
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"Failed to setup wire subsystem\n");
|
||||
return GNUNET_SYSERR;
|
||||
}
|
||||
|
||||
|
||||
if (NULL ==
|
||||
(TEH_plugin = TALER_EXCHANGEDB_plugin_load (TEH_cfg)))
|
||||
{
|
||||
fprintf (stderr,
|
||||
"Failed to initialize DB subsystem\n");
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"Failed to initialize DB subsystem\n");
|
||||
TEH_WIRE_done ();
|
||||
return GNUNET_SYSERR;
|
||||
}
|
||||
@ -859,6 +863,8 @@ exchange_serve_process_config (void)
|
||||
&serve_unixpath,
|
||||
&unixpath_mode))
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"Failed to setup HTTPd subsystem\n");
|
||||
TEH_WIRE_done ();
|
||||
return GNUNET_SYSERR;
|
||||
}
|
||||
|
@ -341,6 +341,8 @@ TEH_WIRE_init (const struct GNUNET_CONFIGURATION_Handle *cfg)
|
||||
&ret);
|
||||
if (GNUNET_OK != ret)
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"Error setting up bank accounts\n");
|
||||
TEH_WIRE_done ();
|
||||
return GNUNET_SYSERR;
|
||||
}
|
||||
@ -349,6 +351,8 @@ TEH_WIRE_init (const struct GNUNET_CONFIGURATION_Handle *cfg)
|
||||
(0 == json_object_size (wire_fee_object)) )
|
||||
{
|
||||
TEH_WIRE_done ();
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"No bank accounts configured\n");
|
||||
return GNUNET_SYSERR;
|
||||
}
|
||||
wire_methods = json_pack ("{s:O, s:O, s:o}",
|
||||
|
@ -1812,8 +1812,12 @@ postgres_iterate_denomination_info (void *cls,
|
||||
.cb_cls = cb_cls,
|
||||
.pg = pc
|
||||
};
|
||||
struct TALER_EXCHANGEDB_Session *session;
|
||||
|
||||
return GNUNET_PQ_eval_prepared_multi_select (postgres_get_session (pc)->conn,
|
||||
session = postgres_get_session (pc);
|
||||
if (NULL == session)
|
||||
return GNUNET_DB_STATUS_HARD_ERROR;
|
||||
return GNUNET_PQ_eval_prepared_multi_select (session->conn,
|
||||
"denomination_iterate",
|
||||
params,
|
||||
&domination_cb_helper,
|
||||
@ -3068,6 +3072,8 @@ postgres_get_known_coin (void *cls,
|
||||
coin_info->coin_pub = *coin_pub;
|
||||
if (NULL == session)
|
||||
session = postgres_get_session (pc);
|
||||
if (NULL == session)
|
||||
return GNUNET_DB_STATUS_HARD_ERROR;
|
||||
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
||||
"get_known_coin",
|
||||
params,
|
||||
@ -3107,6 +3113,8 @@ postgres_get_coin_denomination (
|
||||
TALER_B2S (coin_pub));
|
||||
if (NULL == session)
|
||||
session = postgres_get_session (pc);
|
||||
if (NULL == session)
|
||||
return GNUNET_DB_STATUS_HARD_ERROR;
|
||||
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
||||
"get_coin_denomination",
|
||||
params,
|
||||
@ -3475,6 +3483,8 @@ postgres_get_melt (void *cls,
|
||||
melt->session.coin.denom_sig.rsa_signature = NULL;
|
||||
if (NULL == session)
|
||||
session = postgres_get_session (pg);
|
||||
if (NULL == session)
|
||||
return GNUNET_DB_STATUS_HARD_ERROR;
|
||||
qs = GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
||||
"get_melt",
|
||||
params,
|
||||
|
Loading…
Reference in New Issue
Block a user