diff options
author | deva <deva> | 2009-11-11 11:32:20 +0000 |
---|---|---|
committer | deva <deva> | 2009-11-11 11:32:20 +0000 |
commit | cc585b00aece855f87b1b79b9414c559eb547c97 (patch) | |
tree | 58652f2ab56d42ca0f2ac80f1150d2c22a81f987 | |
parent | bae3ee64b94cdde58bd62a6731a385322ea6a5ee (diff) |
Made database noisy if unknown databse backend is requested.
-rw-r--r-- | server/src/database.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/src/database.cc b/server/src/database.cc index 9a4905b..3ec12cb 100644 --- a/server/src/database.cc +++ b/server/src/database.cc @@ -41,12 +41,16 @@ Database::Database(std::string _backend, std::string _host, std::string _port, s if(_backend == "pgsql") { PRACRO_DEBUG(db, "construct(%s, %s, %s, %s, %s)\n", _host.c_str(), _port.c_str(), _user.c_str(), _passwd.c_str(), _dbname.c_str()); dao = new PracroDAOPgsql(_host, _port, _user, _passwd, _dbname); + return; } #endif/*WITHOUT_DB*/ if(_backend == "testdb") { Data data; dao = new PracroDAOTest(data, true); + return; } + + PRACRO_ERR(database, "Cannot find database backend \"%s\"", _backend.c_str()); } Database::~Database() |