[gnome-software] trivial: Show the error message if refreshing the list of extensions failed



commit 0f7bf203fce4103c569c0e59c60662fb809ccd3d
Author: Richard Hughes <richard hughsie com>
Date:   Thu Mar 3 11:38:40 2016 +0000

    trivial: Show the error message if refreshing the list of extensions failed

 src/plugins/gs-plugin-shell-extensions.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-shell-extensions.c b/src/plugins/gs-plugin-shell-extensions.c
index 8036f8e..3220278 100644
--- a/src/plugins/gs-plugin-shell-extensions.c
+++ b/src/plugins/gs-plugin-shell-extensions.c
@@ -640,8 +640,17 @@ gs_plugin_shell_extensions_get_apps (GsPlugin *plugin,
                                                      msg->response_body->data,
                                                      msg->response_body->length,
                                                      error);
-       if (apps == NULL)
+       if (apps == NULL) {
+               guint len = msg->response_body->length;
+               g_autofree gchar *tmp = NULL;
+
+               /* truncate the string if long */
+               if (len > 100)
+                       len = 100;
+               tmp = g_strndup (msg->response_body->data, len);
+               g_prefix_error (error, "Failed to parse '%s': ", tmp);
                return NULL;
+       }
 
        /* save to the cache */
        if (!g_file_set_contents (cachefn,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]