[epiphany] sqlite-connection: Do not ignore errors when executing commands



commit 9b1a33f00c60411f6526365956d12620d6ca8717
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 bbb2481..8850bda 100644
--- a/lib/ephy-sqlite-connection.c
+++ b/lib/ephy-sqlite-connection.c
@@ -109,7 +109,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]