[gnome-software] trivial: Never show cancelled error messages to the user
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Never show cancelled error messages to the user
- Date: Thu, 19 Jul 2018 09:38:42 +0000 (UTC)
commit 62f6314f9f1262ac7b3c5d78bb96fe57240f7d4f
Author: Richard Hughes <richard hughsie com>
Date: Thu Jul 19 10:38:07 2018 +0100
trivial: Never show cancelled error messages to the user
Fixes https://gitlab.gnome.org/GNOME/gnome-software/issues/417
lib/gs-plugin-loader.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index f0c4da42..8e2feb62 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -382,8 +382,6 @@ gs_plugin_job_to_failed_event (GsPluginJob *plugin_job, const GError *error)
static gboolean
gs_plugin_loader_is_error_fatal (const GError *err)
{
- if (g_error_matches (err, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_CANCELLED))
- return TRUE;
if (g_error_matches (err, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_TIMED_OUT))
return TRUE;
if (g_error_matches (err, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_AUTH_REQUIRED))
@@ -415,6 +413,12 @@ gs_plugin_error_handle_failure (GsPluginLoaderHelper *helper,
return TRUE;
}
+ /* this is only ever informational */
+ if (g_error_matches (error_local, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_CANCELLED)) {
+ g_debug ("ignoring error cancelled: %s", error_local->message);
+ return TRUE;
+ }
+
/* fatal error */
if (gs_plugin_job_get_action (helper->plugin_job) == GS_PLUGIN_ACTION_SETUP ||
gs_plugin_loader_is_error_fatal (error_local) ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]