[db] Log path to db on error, so it's easier to debug

This commit is contained in:
ejurgensen 2017-10-29 22:07:58 +01:00
parent 0c9a23e8d2
commit 79b2cf4fd7
2 changed files with 2 additions and 2 deletions

View File

@ -454,7 +454,7 @@ cache_create(void)
ret = sqlite3_open(g_db_path, &g_db_hdl); ret = sqlite3_open(g_db_path, &g_db_hdl);
if (ret != SQLITE_OK) if (ret != SQLITE_OK)
{ {
DPRINTF(E_LOG, L_CACHE, "Could not open cache database: %s\n", sqlite3_errmsg(g_db_hdl)); DPRINTF(E_LOG, L_CACHE, "Could not open '%s': %s\n", g_db_path, sqlite3_errmsg(g_db_hdl));
sqlite3_close(g_db_hdl); sqlite3_close(g_db_hdl);
return -1; return -1;

View File

@ -5999,7 +5999,7 @@ db_perthread_init(void)
ret = sqlite3_open(db_path, &hdl); ret = sqlite3_open(db_path, &hdl);
if (ret != SQLITE_OK) if (ret != SQLITE_OK)
{ {
DPRINTF(E_LOG, L_DB, "Could not open database: %s\n", sqlite3_errmsg(hdl)); DPRINTF(E_LOG, L_DB, "Could not open '%s': %s\n", db_path, sqlite3_errmsg(hdl));
sqlite3_close(hdl); sqlite3_close(hdl);
return -1; return -1;