aboutsummaryrefslogtreecommitdiff
path: root/src/volume-control.vala
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-10-22 15:58:32 -0400
committerTed Gould <ted@gould.cx>2014-10-22 15:58:32 -0400
commitedf067bcf194607f0f51f0152e3ad5eb6d70d0be (patch)
treeb0e3e947325cf1203078cd8841e4794c257c4e06 /src/volume-control.vala
parent8a25cabee9738ced0da921fcac693495006070af (diff)
downloadayatana-indicator-sound-edf067bcf194607f0f51f0152e3ad5eb6d70d0be.tar.gz
ayatana-indicator-sound-edf067bcf194607f0f51f0152e3ad5eb6d70d0be.tar.bz2
ayatana-indicator-sound-edf067bcf194607f0f51f0152e3ad5eb6d70d0be.zip
Setup a try/catch on the getting of properties
Diffstat (limited to 'src/volume-control.vala')
-rw-r--r--src/volume-control.vala12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/volume-control.vala b/src/volume-control.vala
index e8d35a4..5061ae8 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -747,10 +747,14 @@ public class VolumeControl : Object
// Get current values and listen for changes
_user_proxy.g_properties_changed.connect (accountsservice_props_changed_cb);
- var props_variant = yield _user_proxy.get_connection ().call (_user_proxy.get_name (), _user_proxy.get_object_path (), "org.freedesktop.DBus.Properties", "GetAll", new Variant ("(s)", _user_proxy.get_interface_name ()), null, DBusCallFlags.NONE, -1);
- Variant props;
- props_variant.get ("(@a{sv})", out props);
- accountsservice_props_changed_cb(_user_proxy, props, null);
+ try {
+ var props_variant = yield _user_proxy.get_connection ().call (_user_proxy.get_name (), _user_proxy.get_object_path (), "org.freedesktop.DBus.Properties", "GetAll", new Variant ("(s)", _user_proxy.get_interface_name ()), null, DBusCallFlags.NONE, -1);
+ Variant props;
+ props_variant.get ("(@a{sv})", out props);
+ accountsservice_props_changed_cb(_user_proxy, props, null);
+ } catch (GLib.Error e) {
+ debug("Unable to get properties for user %s at first try: %s", username, e.message);
+ }
}
private void greeter_user_changed (string username)