Improve an error message in db_init().
If we cannot open a connection to the sqlite3 database, show the name of the database we failed to access, and also hint at the fact that a likely reason for the problem is a missing sqlite3 driver for libdbi. Change-Id: If1c0026e882984b4358ce116ec4a7ad40340517c
This commit is contained in:
parent
ce4e984fe8
commit
832046d383
|
@ -614,7 +614,8 @@ int db_init(const char *name)
|
|||
|
||||
conn = dbi_conn_new_r("sqlite3", inst);
|
||||
if (conn == NULL) {
|
||||
LOGP(DDB, LOGL_FATAL, "Failed to create connection.\n");
|
||||
LOGP(DDB, LOGL_FATAL, "Failed to create database connection to sqlite3 db '%s'; "
|
||||
"Is the sqlite3 database driver for libdbi installed on this system?\n", name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue