camel_provider_list(): Emit CRITICAL if camel_provider_load() fails.
authorMatthew Barnes <mbarnes@redhat.com>
Sun, 1 Jul 2012 11:50:59 +0000 (07:50 -0400)
committerMatthew Barnes <mbarnes@redhat.com>
Sun, 1 Jul 2012 11:50:59 +0000 (07:50 -0400)
Otherwise CamelProvider modules may be silently dropped without so much
as a console message.

camel/camel-provider.c

index 964de76..f44f96d 100644 (file)
@@ -337,11 +337,20 @@ camel_provider_list (gboolean load)
                g_hash_table_foreach (module_table, add_to_list, &list);
                for (w = list; w; w = w->next) {
                        CamelProviderModule *m = w->data;
+                       GError *error = NULL;
 
                        if (!m->loaded) {
-                               camel_provider_load (m->path, NULL);
+                               camel_provider_load (m->path, &error);
                                m->loaded = 1;
                        }
+
+                       if (error != NULL) {
+                               g_critical (
+                                       "%s: %s: %s",
+                                       G_STRFUNC, m->path,
+                                       error->message);
+                               g_error_free (error);
+                       }
                }
                g_list_free (list);
                list = NULL;