From 298e68fe7486240d4a417822399c51540004972f Mon Sep 17 00:00:00 2001 From: Wook Song Date: Thu, 18 Jan 2024 20:30:29 +0900 Subject: [PATCH] [Daemaon/Service] Add DB_PATH to the error message for DB open failure This patch appends DB_PATH to the error message for failure in opening the database file. Note that DB_PATH is not the SQLITE3 database file, but the path prefix where the file is placed. CC: Jaeyun Jung Signed-off-by: Wook Song --- daemon/service-db.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon/service-db.cc b/daemon/service-db.cc index be01ed9..1729f88 100644 --- a/daemon/service-db.cc +++ b/daemon/service-db.cc @@ -167,7 +167,8 @@ MLServiceDB::connectDB () rc = sqlite3_open (_path.c_str (), &_db); if (rc != SQLITE_OK) { - _E ("Failed to open database: %s (%d)", sqlite3_errmsg (_db), rc); + _E ("Failed to open database: %s (ret: %d, db_path_prefix: %s)", + sqlite3_errmsg (_db), rc, DB_PATH); goto error; } -- 2.7.4