diff options
author | fiaxh <git@mx.ax.lt> | 2017-10-28 23:48:07 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-10-31 15:41:45 +0100 |
commit | b9df78e4494879752e9e68dcc5d54e03fffe9467 (patch) | |
tree | d1c74fde4aedea42773bc411c557f2184003defa /plugins/omemo/src/session_store.vala | |
parent | d9b91206c0291fa8aa58df572292784a4f8ff878 (diff) | |
download | dino-b9df78e4494879752e9e68dcc5d54e03fffe9467.tar.gz dino-b9df78e4494879752e9e68dcc5d54e03fffe9467.zip |
Move DatabaseError handling into Qlite
Diffstat (limited to 'plugins/omemo/src/session_store.vala')
-rw-r--r-- | plugins/omemo/src/session_store.vala | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/plugins/omemo/src/session_store.vala b/plugins/omemo/src/session_store.vala index 333fdc08..25b4d719 100644 --- a/plugins/omemo/src/session_store.vala +++ b/plugins/omemo/src/session_store.vala @@ -29,29 +29,21 @@ private class BackedSessionStore : SimpleSessionStore { } public void on_session_stored(SessionStore.Session session) { - try { - db.session.insert().or("REPLACE") - .value(db.session.identity_id, identity_id) - .value(db.session.address_name, session.name) - .value(db.session.device_id, session.device_id) - .value(db.session.record_base64, Base64.encode(session.record)) - .perform(); - } catch (Error e) { - print(@"OMEMO: Error while updating session store: $(e.message)\n"); - } + db.session.insert().or("REPLACE") + .value(db.session.identity_id, identity_id) + .value(db.session.address_name, session.name) + .value(db.session.device_id, session.device_id) + .value(db.session.record_base64, Base64.encode(session.record)) + .perform(); } public void on_session_deleted(SessionStore.Session session) { - try { - db.session.delete() - .with(db.session.identity_id, "=", identity_id) - .with(db.session.address_name, "=", session.name) - .with(db.session.device_id, "=", session.device_id) - .perform(); - } catch (Error e) { - print(@"OMEMO: Error while updating session store: $(e.message)\n"); - } + db.session.delete() + .with(db.session.identity_id, "=", identity_id) + .with(db.session.address_name, "=", session.name) + .with(db.session.device_id, "=", session.device_id) + .perform(); } } -}
\ No newline at end of file +} |