[glib/portal] Set an error on failure
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/portal] Set an error on failure
- Date: Wed, 6 Jul 2016 23:52:20 +0000 (UTC)
commit 9d59e45961f11393093fed39cd62df56c3ba18fc
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jul 6 19:29:13 2016 -0400
Set an error on failure
'has no owner' seems close enough, that is what we are seeing
here.
gio/gnetworkmonitorportal.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gio/gnetworkmonitorportal.c b/gio/gnetworkmonitorportal.c
index 438fcf5..0d3aeb1 100644
--- a/gio/gnetworkmonitorportal.c
+++ b/gio/gnetworkmonitorportal.c
@@ -135,6 +135,10 @@ g_network_monitor_portal_initable_init (GInitable *initable,
if (!name_owner)
{
g_object_unref (proxy);
+ g_set_error (error,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_NAME_HAS_NO_OWNER,
+ "Desktop portal not found");
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]