From a61e60fc42405039a60e02f43b84cf7c7e205d78 Mon Sep 17 00:00:00 2001 From: Travis Reitter Date: Wed, 16 Jun 2010 11:26:35 -0700 Subject: [PATCH] Create our own errordomain for Tpf.Persona errors. --- backends/telepathy/tpf-persona.vala | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/backends/telepathy/tpf-persona.vala b/backends/telepathy/tpf-persona.vala index 3ea31de..92ef816 100644 --- a/backends/telepathy/tpf-persona.vala +++ b/backends/telepathy/tpf-persona.vala @@ -23,6 +23,11 @@ using GLib; using TelepathyGLib; using Folks; +errordomain Tpf.PersonaError +{ + INVALID_ARGUMENT +} + /** * A persona subclass which represents a single instant messaging contact from * Telepathy. @@ -169,15 +174,14 @@ public class Tpf.Persona : Folks.Persona, * Create a new persona for the {@link PersonaStore} `store`, representing * the Telepathy contact given by `contact`. */ - public Persona (Contact contact, PersonaStore store) throws - TelepathyGLib.Error + public Persona (Contact contact, PersonaStore store) throws Tpf.PersonaError { /* FIXME: There is the possibility of a crash in the error condition below * due to bgo#604299, where the C self variable isn't initialised until we * chain up to the Object constructor, below. */ var uid = contact.get_identifier (); if (uid == null || uid == "") - throw new TelepathyGLib.Error.INVALID_ARGUMENT ("contact has an " + + throw new Tpf.PersonaError.INVALID_ARGUMENT ("contact has an " + "invalid UID"); var account = account_for_connection (contact.get_connection ()); -- 2.7.4