[glib/mcatanzaro/gdbus-error: 62/62] gdbus: Improve error when well-known name is unowned
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/mcatanzaro/gdbus-error: 62/62] gdbus: Improve error when well-known name is unowned
- Date: Wed, 12 Sep 2018 16:34:48 +0000 (UTC)
commit 0e0b94d6354d5474baa4879aa393a5b2a98c9a59
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Wed Sep 12 11:07:45 2018 -0500
gdbus: Improve error when well-known name is unowned
We should indicate the name, so that we have some chance of debugging
this problem.
gio/gdbusproxy.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/gio/gdbusproxy.c b/gio/gdbusproxy.c
index ae7058371..3c0d0544e 100644
--- a/gio/gdbusproxy.c
+++ b/gio/gdbusproxy.c
@@ -2723,7 +2723,8 @@ g_dbus_proxy_call_internal (GDBusProxy *proxy,
g_task_return_new_error (task,
G_IO_ERROR,
G_IO_ERROR_FAILED,
- _("Cannot invoke method; proxy is for a well-known name without an
owner and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag"));
+ _("Cannot invoke method; proxy is for the well-known name %s without
an owner, and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag"),
+ proxy->priv->name);
g_object_unref (task);
}
G_UNLOCK (properties_lock);
@@ -2854,10 +2855,11 @@ g_dbus_proxy_call_sync_internal (GDBusProxy *proxy,
destination = g_strdup (get_destination_for_call (proxy));
if (destination == NULL)
{
- g_set_error_literal (error,
- G_IO_ERROR,
- G_IO_ERROR_FAILED,
- _("Cannot invoke method; proxy is for a well-known name without an owner and
proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag"));
+ g_set_error (error,
+ G_IO_ERROR,
+ G_IO_ERROR_FAILED,
+ _("Cannot invoke method; proxy is for the well-known name %s without an owner, and
proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag"),
+ proxy->priv->name);
ret = NULL;
G_UNLOCK (properties_lock);
goto out;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]