[gnome-todo/feature/debug-list-creation-failing-silently] eds: Log a debug message if create_source() fails
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo/feature/debug-list-creation-failing-silently] eds: Log a debug message if create_source() fails
- Date: Wed, 3 Nov 2021 20:33:24 +0000 (UTC)
commit 0ac2c8f97152186c1939e711f6de33550550f5b7
Author: Niels De Graef <nielsdegraef gmail com>
Date: Wed Nov 3 21:32:45 2021 +0100
eds: Log a debug message if create_source() fails
That way, it's easier to debug what actually went wrong.
See https://gitlab.gnome.org/GNOME/gnome-todo/-/issues/116 for more info
src/plugins/eds/gtd-provider-eds.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/eds/gtd-provider-eds.c b/src/plugins/eds/gtd-provider-eds.c
index 22b0433b..d46d70e8 100644
--- a/src/plugins/eds/gtd-provider-eds.c
+++ b/src/plugins/eds/gtd-provider-eds.c
@@ -795,11 +795,16 @@ gtd_provider_eds_create_task_list (GtdProvider *provider,
source = NULL;
/* Create an ESource */
- if (GTD_PROVIDER_EDS_CLASS (G_OBJECT_GET_CLASS (provider))->create_source)
- source = GTD_PROVIDER_EDS_CLASS (G_OBJECT_GET_CLASS (provider))->create_source (self);
+ if (!GTD_PROVIDER_EDS_CLASS (G_OBJECT_GET_CLASS (provider))->create_source) {
+ g_debug ("Can't create task list: not supported by %s", G_OBJECT_TYPE_NAME (provider));
+ return;
+ }
- if (!source)
+ source = GTD_PROVIDER_EDS_CLASS (G_OBJECT_GET_CLASS (provider))->create_source (self);
+ if (!source) {
+ g_debug ("Can't create task list: create_source() returned NULL");
return;
+ }
/* EDS properties */
e_source_set_display_name (source, name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]