[folks] tracker: Throw an error if personas are added before store is prepared.
- From: Jeremy Whiting <jpwhiting src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] tracker: Throw an error if personas are added before store is prepared.
- Date: Mon, 16 Jul 2012 21:38:21 +0000 (UTC)
commit cfcebbd6272db4efd7e88ae1aa999afc07bf4132
Author: Jeremy Whiting <jpwhiting kde org>
Date: Mon Jul 16 15:30:16 2012 -0600
tracker: Throw an error if personas are added before store is prepared.
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 a2b37ed..17c949d 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]