summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Reitter <travis.reitter@collabora.co.uk>2011-10-10 18:07:01 (GMT)
committerTravis Reitter <travis.reitter@collabora.co.uk>2011-10-11 01:13:17 (GMT)
commita91dd88b08997bef53593fed7c40441c05580478 (patch)
treee0247b87b0c44e4bc119b8b8ceddb23bc69c279c
parent4e44a1b104e6f7b929d16808d18d9667fc4c5368 (diff)
downloadfolks-a91dd88b08997bef53593fed7c40441c05580478.tar.gz
folks-a91dd88b08997bef53593fed7c40441c05580478.tar.xz
Distinguish Telepathy errors with new UNSUPPORTED_ON_NON_USER
-rw-r--r--NEWS1
-rw-r--r--backends/telepathy/lib/tpf-persona-store.vala2
-rw-r--r--folks/persona-store.vala8
3 files changed, 10 insertions, 1 deletions
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,
}
/**