From a5756034e7e2a1a263e73498fa41118e3388bdcc Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 29 Jun 2010 12:30:40 +0100 Subject: [PATCH] Catch some unhandled errors --- backends/telepathy/tpf-persona-store.vala | 34 +++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/backends/telepathy/tpf-persona-store.vala b/backends/telepathy/tpf-persona-store.vala index 373c80f..787c43f 100644 --- a/backends/telepathy/tpf-persona-store.vala +++ b/backends/telepathy/tpf-persona-store.vala @@ -147,7 +147,16 @@ public class Tpf.PersonaStore : Folks.PersonaStore this.conn.request_handles (-1, HandleType.CONTACT, contacts, (c, ht, nh, h, i, e, w) => { - this.change_favourites_by_request_handles (nh, h, i, e, true); + try + { + this.change_favourites_by_request_handles (nh, h, i, e, + true); + } + catch (GLib.Error e) + { + warning ("couldn't get list of favourite contacts: %s", + e.message); + } }, this); /* FIXME: Have to pass this as weak_object parameter since Vala @@ -210,7 +219,16 @@ public class Tpf.PersonaStore : Folks.PersonaStore this.conn.request_handles (-1, HandleType.CONTACT, added, (c, ht, nh, h, i, e, w) => { - this.change_favourites_by_request_handles (nh, h, i, e, true); + try + { + this.change_favourites_by_request_handles (nh, h, i, e, + true); + } + catch (GLib.Error e) + { + warning ("couldn't add favourite contacts: %s", + e.message); + } }, this); } @@ -221,8 +239,16 @@ public class Tpf.PersonaStore : Folks.PersonaStore this.conn.request_handles (-1, HandleType.CONTACT, removed, (c, ht, nh, h, i, e, w) => { - this.change_favourites_by_request_handles (nh, h, i, e, - false); + try + { + this.change_favourites_by_request_handles (nh, h, i, e, + false); + } + catch (GLib.Error e) + { + warning ("couldn't remove favourite contacts: %s", + e.message); + } }, this); } -- 2.7.4