diff options
author | fiaxh <git@lightrise.org> | 2020-10-27 15:31:39 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2020-10-27 16:05:30 +0100 |
commit | 2e0357877cf3e8e391d3f8f02970defa93c710eb (patch) | |
tree | 4478a0deebbedf00934c7a7d6324180c4158bb38 /libdino/src/service/database.vala | |
parent | edbc8f794d42cc30bfbe6602becb43c3500e02a2 (diff) | |
download | dino-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.vala | 11 |
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) { |