[epiphany/gnome-3-20] 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-20] sqlite-connection: Do not ignore errors when executing commands
- Date: Sat, 4 Mar 2017 20:07:00 +0000 (UTC)
commit 2724952cfb1d43281b3b27ef21c8c841ed144bbb
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]