[epiphany/gnome-3-22] sqlite-connection: Do not ignore errors when executing commands
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-22] sqlite-connection: Do not ignore errors when executing commands
- Date: Sun, 19 Feb 2017 16:40:07 +0000 (UTC)
commit 9d75f710be56c92b87fe91484d579559172aa92b
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Tue Feb 14 22:55:37 2017 -0600
sqlite-connection: Do not ignore errors when executing commands
This file is so careful to handle errors properly everywhere EXCEPT the
point where actual SQLite commands are executed. The history database is
pretty much totally broken right now; having error messages would be
helpful thank you!
lib/ephy-sqlite-connection.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/lib/ephy-sqlite-connection.c b/lib/ephy-sqlite-connection.c
index 90266a4..273f9d6 100644
--- a/lib/ephy-sqlite-connection.c
+++ b/lib/ephy-sqlite-connection.c
@@ -106,7 +106,11 @@ ephy_sqlite_connection_execute (EphySQLiteConnection *self, const char *sql, GEr
return FALSE;
}
- return sqlite3_exec (self->database, sql, NULL, NULL, NULL) == SQLITE_OK;
+ if (sqlite3_exec (self->database, sql, NULL, NULL, NULL) != SQLITE_OK) {
+ ephy_sqlite_connection_get_error (self, error);
+ return FALSE;
+ }
+ return TRUE;
}
EphySQLiteStatement *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]