From a91dd88b08997bef53593fed7c40441c05580478 Mon Sep 17 00:00:00 2001 From: Travis Reitter Date: Mon, 10 Oct 2011 11:07:01 -0700 Subject: [PATCH] Distinguish Telepathy errors with new UNSUPPORTED_ON_NON_USER --- NEWS | 1 + backends/telepathy/lib/tpf-persona-store.vala | 2 +- folks/persona-store.vala | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index c0d5756..79cdc36 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ API changes: * Implement EmailDetails on Tpf.Persona * Implement UrlDetails on Tpf.Persona * Implement BirthdayDetails on Tpf.Persona +* Add PersonaStoreError.UNSUPPORTED_ON_NON_USER Overview of changes from libfolks 0.6.3.1 to libfolks 0.6.3.2 ============================================================= diff --git a/backends/telepathy/lib/tpf-persona-store.vala b/backends/telepathy/lib/tpf-persona-store.vala index 9dec990..560e402 100644 --- a/backends/telepathy/lib/tpf-persona-store.vala +++ b/backends/telepathy/lib/tpf-persona-store.vala @@ -2250,7 +2250,7 @@ public class Tpf.PersonaStore : Folks.PersonaStore { if (!persona.is_user) { - throw new PersonaStoreError.INVALID_ARGUMENT ( + throw new PersonaStoreError.UNSUPPORTED_ON_NON_USER ( _("Extended information may only be set on the user's Telepathy contact.")); } diff --git a/folks/persona-store.vala b/folks/persona-store.vala index aa533c1..3b4c3e0 100644 --- a/folks/persona-store.vala +++ b/folks/persona-store.vala @@ -115,6 +115,14 @@ public errordomain Folks.PersonaStoreError * @since 0.6.0 */ REMOVE_FAILED, + + /** + * Such an operation may only be performed on a {@link Persona} with + * {@link Persona.is_user} set to `true`. + * + * @since UNRELEASED + */ + UNSUPPORTED_ON_NON_USER, } /** -- 2.7.4