Better error message when backends can't be started
This commit is contained in:
parent
ae953ed2e0
commit
08a5e487db
2 changed files with 9 additions and 2 deletions
|
@ -39,7 +39,8 @@ int main (int argc, char* argv[]) {
|
|||
StorageBackend *storagebackend;
|
||||
storagebackend = StorageBackend::createBackend(cfg, error);
|
||||
if (storagebackend == NULL) {
|
||||
LOG4CXX_ERROR(logger, "Error creating StorageBackend! " << error)
|
||||
LOG4CXX_ERROR(logger, "Error creating StorageBackend! " << error);
|
||||
LOG4CXX_ERROR(logger, "Twitter backend needs storage backend configured to work! " << error);
|
||||
return -2;
|
||||
}
|
||||
|
||||
|
|
|
@ -332,7 +332,13 @@ void NetworkPluginServer::start() {
|
|||
if (result != 0) {
|
||||
if (WIFEXITED(status)) {
|
||||
if (WEXITSTATUS(status) != 0) {
|
||||
LOG4CXX_ERROR(logger, "Backend can not be started, exit_code=" << WEXITSTATUS(status) << ", possible error: " << strerror(WEXITSTATUS(status)));
|
||||
if (status == 254) {
|
||||
LOG4CXX_ERROR(logger, "Backend can not be started, because it needs database to store data, but the database backend is not configured.");
|
||||
}
|
||||
else {
|
||||
LOG4CXX_ERROR(logger, "Backend can not be started, exit_code=" << WEXITSTATUS(status) << ", possible error: " << strerror(WEXITSTATUS(status)));
|
||||
}
|
||||
LOG4CXX_ERROR(logger, "Check backend log for more details");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue