[discident-glib] ean: Better error when an Amazon parameter is missing
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [discident-glib] ean: Better error when an Amazon parameter is missing
- Date: Mon, 21 Dec 2015 22:13:48 +0000 (UTC)
commit a8f76ccbe1bc0050afaf3299723ff4a58f73e7f9
Author: Bastien Nocera <hadess hadess net>
Date: Mon Dec 21 20:24:58 2015 +0100
ean: Better error when an Amazon parameter is missing
discident-glib/discident-ean-glib.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/discident-glib/discident-ean-glib.c b/discident-glib/discident-ean-glib.c
index 5c24fa9..1124ef0 100644
--- a/discident-glib/discident-ean-glib.c
+++ b/discident-glib/discident-ean-glib.c
@@ -88,7 +88,17 @@ parameters_are_valid (DiscidentEan *ean,
ean->priv->associate_tag != NULL)
return TRUE;
- g_set_error (error, DISCIDENT_ERROR, DISCIDENT_ERROR_MISSING_PARAMETERS, "Parameters are missing to
access this web service");
+ if (ean->priv->access_key == NULL) {
+ g_set_error (error, DISCIDENT_ERROR, DISCIDENT_ERROR_MISSING_PARAMETERS,
+ "Access key is missing to access this web service");
+ } else if (ean->priv->private_key == NULL) {
+ g_set_error (error, DISCIDENT_ERROR, DISCIDENT_ERROR_MISSING_PARAMETERS,
+ "Private key is missing to access this web service");
+ } else if (ean->priv->associate_tag == NULL) {
+ g_set_error (error, DISCIDENT_ERROR, DISCIDENT_ERROR_MISSING_PARAMETERS,
+ "Associate tag is missing to access this web service");
+ }
+
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]