summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeif Lotfy <seif@lotfy.com>2013-01-14 17:46:48 +0100
committerSeif Lotfy <seif@lotfy.com>2013-01-14 17:46:48 +0100
commit98a17f4b92ee4d2dcb3bc6ebf016fd487167c3d0 (patch)
tree8c6dc1c35949aa81a8ebc32242e2d8dad4a291ab
parentc0ad69a4bbc98dbf2e6fa83800983b76c89d20c9 (diff)
Added catching of dbus connection error in reinstall_monitor
-rw-r--r--libzeitgeist/log.vala23
1 files changed, 15 insertions, 8 deletions
diff --git a/libzeitgeist/log.vala b/libzeitgeist/log.vala
index fa23efb5..6fda5aee 100644
--- a/libzeitgeist/log.vala
+++ b/libzeitgeist/log.vala
@@ -384,18 +384,25 @@ public class Log : QueuedProxyWrapper
{
if (monitors.lookup (monitor) == 0)
{
- DBusConnection conn = ((DBusProxy) proxy).get_connection ();
-
try
{
- uint registration_id = conn.register_object<RemoteMonitor> (
- monitor.get_path (), monitor);
- monitors.insert (monitor, registration_id);
+ DBusConnection conn = ((DBusProxy) proxy).get_connection ();
+
+ try
+ {
+ uint registration_id = conn.register_object<RemoteMonitor> (
+ monitor.get_path (), monitor);
+ monitors.insert (monitor, registration_id);
+ }
+ catch (GLib.IOError err)
+ {
+ warning ("Error installing monitor: %s", err.message);
+ return;
+ }
}
- catch (GLib.IOError err)
+ catch (IOError err)
{
- warning ("Error installing monitor: %s", err.message);
- return;
+ critical ("Unable to connect to DBus session bus: %s", err.message);
}
}