aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/database.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-10-27 15:31:39 +0100
committerfiaxh <git@lightrise.org>2020-10-27 16:05:30 +0100
commit2e0357877cf3e8e391d3f8f02970defa93c710eb (patch)
tree4478a0deebbedf00934c7a7d6324180c4158bb38 /libdino/src/service/database.vala
parentedbc8f794d42cc30bfbe6602becb43c3500e02a2 (diff)
downloaddino-2e0357877cf3e8e391d3f8f02970defa93c710eb.tar.gz
dino-2e0357877cf3e8e391d3f8f02970defa93c710eb.zip
Fix some compiler warnings
Diffstat (limited to 'libdino/src/service/database.vala')
-rw-r--r--libdino/src/service/database.vala11
1 files changed, 8 insertions, 3 deletions
diff --git a/libdino/src/service/database.vala b/libdino/src/service/database.vala
index e6c03bf6..6384fa78 100644
--- a/libdino/src/service/database.vala
+++ b/libdino/src/service/database.vala
@@ -293,9 +293,14 @@ public class Database : Qlite.Database {
mam_catchup = new MamCatchupTable(this);
settings = new SettingsTable(this);
init({ account, jid, entity, content_item, message, message_correction, real_jid, file_transfer, conversation, avatar, entity_identity, entity_feature, roster, mam_catchup, settings });
- exec("PRAGMA journal_mode = WAL");
- exec("PRAGMA synchronous = NORMAL");
- exec("PRAGMA secure_delete = ON");
+
+ try {
+ exec("PRAGMA journal_mode = WAL");
+ exec("PRAGMA synchronous = NORMAL");
+ exec("PRAGMA secure_delete = ON");
+ } catch (Error e) {
+ error("Failed to set database properties: %s", e.message);
+ }
}
public override void migrate(long oldVersion) {