[Daemaon/Service] Add DB_PATH to the error message for DB open failure accepted/tizen/unified/20240119.154757
authorWook Song <wook16.song@samsung.com>
Thu, 18 Jan 2024 11:30:29 +0000 (20:30 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Fri, 19 Jan 2024 00:51:47 +0000 (09:51 +0900)
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 <jy1210.jung@samsung.com>
Signed-off-by: Wook Song <wook16.song@samsung.com>
daemon/service-db.cc

index be01ed9..1729f88 100644 (file)
@@ -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;
   }