diff options
author | Jeremy Whiting <jpwhiting@kde.org> | 2012-07-16 15:30:16 -0600 |
---|---|---|
committer | Jeremy Whiting <jpwhiting@kde.org> | 2012-07-16 15:30:16 -0600 |
commit | cfcebbd6272db4efd7e88ae1aa999afc07bf4132 (patch) | |
tree | ec260f762c1253d31b41e9cff7c26a16fa804e9e /backends/tracker/lib | |
parent | 358e7d8cd7c62f7df4f0897922881ebebb19f925 (diff) |
tracker: Throw an error if personas are added before store is prepared.
Diffstat (limited to 'backends/tracker/lib')
-rw-r--r-- | backends/tracker/lib/trf-persona-store.vala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/backends/tracker/lib/trf-persona-store.vala b/backends/tracker/lib/trf-persona-store.vala index a2b37edb..17c949df 100644 --- a/backends/tracker/lib/trf-persona-store.vala +++ b/backends/tracker/lib/trf-persona-store.vala @@ -1853,13 +1853,20 @@ public class Trf.PersonaStore : Folks.PersonaStore } private async string? _insert_persona (string query, string persona_var) + throws PersonaStoreError { GLib.Variant variant; string contact_urn = null; + if (!this.is_prepared) + { + throw new PersonaStoreError.CREATE_FAILED("Cannot insert persona before store is prepared"); + } + try { debug ("_insert_persona: %s", query); + debug ("_connection is %p", this._connection); variant = yield this._connection.update_blank_async (query); VariantIter iter1, iter2, iter3; |