[tracker] libtracker-data: Improve logging after sqlite error, before aborting
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Improve logging after sqlite error, before aborting
- Date: Tue, 20 Jul 2010 18:50:10 +0000 (UTC)
commit 7a32726c9916d9bff32086548a4b0dd8183dc4d7
Author: Aleksander Morgado <aleksander lanedo com>
Date: Tue Jul 20 20:49:52 2010 +0200
libtracker-data: Improve logging after sqlite error, before aborting
src/libtracker-data/tracker-db-interface-sqlite.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c b/src/libtracker-data/tracker-db-interface-sqlite.c
index 3ed2d0c..26c43fb 100644
--- a/src/libtracker-data/tracker-db-interface-sqlite.c
+++ b/src/libtracker-data/tracker-db-interface-sqlite.c
@@ -24,6 +24,7 @@
#include <sqlite3.h>
#include <stdlib.h>
#include <math.h>
+#include <errno.h>
#include <libtracker-common/tracker-common.h>
@@ -829,6 +830,10 @@ create_result_set_from_stmt (TrackerDBInterface *interface,
sqlite3_errcode (interface->db) == SQLITE_CORRUPT ||
sqlite3_errcode (interface->db) == SQLITE_NOTADB) {
+ g_critical ("SQLite error: %s (errno: %s)",
+ sqlite3_errmsg (interface->db),
+ g_strerror (errno));
+
sqlite3_finalize (stmt);
sqlite3_close (interface->db);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]