[folks] Distinguish Telepathy errors with new UNSUPPORTED_ON_NON_USER
- From: Travis Reitter <treitter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Distinguish Telepathy errors with new UNSUPPORTED_ON_NON_USER
- Date: Tue, 11 Oct 2011 01:14:59 +0000 (UTC)
commit a91dd88b08997bef53593fed7c40441c05580478
Author: Travis Reitter <travis reitter collabora co uk>
Date: Mon Oct 10 11:07:01 2011 -0700
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 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,
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]