From 1654ee60d6bede0ba77afc02c4c825c686e13361 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Tue, 11 Jun 2019 14:47:35 +0200 Subject: qlite: use critical() instead of error() for failed transactions --- qlite/src/delete_builder.vala | 2 +- qlite/src/insert_builder.vala | 2 +- qlite/src/update_builder.vala | 2 +- qlite/src/upsert_builder.vala | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'qlite') diff --git a/qlite/src/delete_builder.vala b/qlite/src/delete_builder.vala index e7e3b784..45e09dc7 100644 --- a/qlite/src/delete_builder.vala +++ b/qlite/src/delete_builder.vala @@ -53,7 +53,7 @@ public class DeleteBuilder : StatementBuilder { public void perform() { if (prepare().step() != DONE) { - error(@"SQLite error: %d - %s", db.errcode(), db.errmsg()); + critical(@"SQLite error: %d - %s", db.errcode(), db.errmsg()); } } diff --git a/qlite/src/insert_builder.vala b/qlite/src/insert_builder.vala index b66464a6..8b14b33f 100644 --- a/qlite/src/insert_builder.vala +++ b/qlite/src/insert_builder.vala @@ -74,7 +74,7 @@ public class InsertBuilder : StatementBuilder { public int64 perform() { if (prepare().step() != DONE) { - error(@"SQLite error: %d - %s", db.errcode(), db.errmsg()); + critical(@"SQLite error: %d - %s", db.errcode(), db.errmsg()); } return db.last_insert_rowid(); } diff --git a/qlite/src/update_builder.vala b/qlite/src/update_builder.vala index f675a85c..0bf83aee 100644 --- a/qlite/src/update_builder.vala +++ b/qlite/src/update_builder.vala @@ -94,7 +94,7 @@ public class UpdateBuilder : StatementBuilder { public void perform() { if (fields.length == 0) return; if (prepare().step() != DONE) { - error("SQLite error: %d - %s", db.errcode(), db.errmsg()); + critical("SQLite error: %d - %s", db.errcode(), db.errmsg()); } } diff --git a/qlite/src/upsert_builder.vala b/qlite/src/upsert_builder.vala index 54ba9924..6d29b288 100644 --- a/qlite/src/upsert_builder.vala +++ b/qlite/src/upsert_builder.vala @@ -100,7 +100,7 @@ public class UpsertBuilder : StatementBuilder { public int64 perform() { if (prepare_update().step() != DONE || prepare_insert().step() != DONE) { - error(@"SQLite error: %d - %s", db.errcode(), db.errmsg()); + critical(@"SQLite error: %d - %s", db.errcode(), db.errmsg()); } return db.last_insert_rowid(); } -- cgit v1.2.3-70-g09d2