Advice to check the log to find out reason when we can't connect the DB
This commit is contained in:
parent
79d0e907bb
commit
f18e3570a8
1 changed files with 2 additions and 2 deletions
|
@ -353,7 +353,7 @@ int main(int argc, char **argv)
|
|||
if (CONFIG_STRING(&config, "database.type") == "sqlite3") {
|
||||
storageBackend = new SQLite3Backend(&config);
|
||||
if (!storageBackend->connect()) {
|
||||
std::cerr << "Can't connect to database.\n";
|
||||
std::cerr << "Can't connect to database. Check the log to find out the reason.\n";
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -362,7 +362,7 @@ int main(int argc, char **argv)
|
|||
if (CONFIG_STRING(&config, "database.type") == "mysql") {
|
||||
storageBackend = new MySQLBackend(&config);
|
||||
if (!storageBackend->connect()) {
|
||||
std::cerr << "Can't connect to database.\n";
|
||||
std::cerr << "Can't connect to database. Check the log to find out the reason.\n";
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue