Changeset - 08a5e487db0c
[Not reviewed]
0 2 0
Jan Kaluza - 13 years ago 2012-11-27 10:33:04
hanzz.k@gmail.com
Better error message when backends can't be started
2 files changed with 9 insertions and 2 deletions:
0 comments (0 inline, 0 general)
backends/twitter/main.cpp
Show inline comments
 
@@ -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;
 
	}
 

	
src/networkpluginserver.cpp
Show inline comments
 
@@ -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;
 
				}
 
			}
0 comments (0 inline, 0 general)