[tracker] libtracker-data: Print detailed error
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Print detailed error
- Date: Mon, 24 Aug 2020 16:00:27 +0000 (UTC)
commit a92fbb0cb366baa3d3dacecce5c551769be4bc73
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Aug 24 15:01:15 2020 +0200
libtracker-data: Print detailed error
The warning is not that much useful, as it hides away the actual error
happening. Print that instead.
src/libtracker-data/tracker-db-interface-sqlite.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c
b/src/libtracker-data/tracker-db-interface-sqlite.c
index 883642bb3..46b2aab46 100644
--- a/src/libtracker-data/tracker-db-interface-sqlite.c
+++ b/src/libtracker-data/tracker-db-interface-sqlite.c
@@ -2181,7 +2181,10 @@ close_database (TrackerDBInterface *db_interface)
if (db_interface->db) {
rc = sqlite3_close (db_interface->db);
- g_warn_if_fail (rc == SQLITE_OK);
+ if (rc != SQLITE_OK) {
+ g_warning ("Database closed uncleanly: %s",
+ sqlite3_errstr (rc));
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]