summaryrefslogtreecommitdiff
path: root/server/src/pracrod.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/pracrod.cc')
-rw-r--r--server/src/pracrod.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/server/src/pracrod.cc b/server/src/pracrod.cc
index 73fe259..cfdafdd 100644
--- a/server/src/pracrod.cc
+++ b/server/src/pracrod.cc
@@ -296,8 +296,16 @@ int main(int argc, char *argv[])
}
// Load config
- if(configfile) configparser = new ConfigurationParser(configfile);
- else configparser = new ConfigurationParser(ETC"/pracrod.conf");
+ try {
+ if(configfile) configparser = new ConfigurationParser(configfile);
+ else configparser = new ConfigurationParser(ETC"/pracrod.conf");
+ } catch(ConfigurationParser::ParseException &e) {
+ ERR_LOG(pracrod, "Config file parse error: %s.\n", e.what());
+ return 1;
+ } catch(ConfigurationParser::ReadException &e) {
+ ERR_LOG(pracrod, "Config file read error: %s.\n", e.what());
+ return 1;
+ }
if(sessionpath != "") {
Conf::session_path = sessionpath;
@@ -308,7 +316,7 @@ int main(int argc, char *argv[])
}
if(Conf::database_backend == "testdb") {
- // Test db (memory only db) does not work in plural.
+ WARN(pracrod, "Test db (memory only db) does not work in plural.\n");
Conf::database_poolsize = 1;
}