aboutsummaryrefslogtreecommitdiff
path: root/src/server/authserver/Main.cpp
diff options
context:
space:
mode:
authorDDuarte <dnpd.dd@gmail.com>2014-07-29 01:47:00 +0100
committerDDuarte <dnpd.dd@gmail.com>2014-07-29 01:47:00 +0100
commit0e52b111f3731611ff6c5be2bf0bd849d4e012fb (patch)
treeb2f1f6a1b16ab79078fdce924e088ca162b630db /src/server/authserver/Main.cpp
parent833195062c310685b479ed16ff4ac5ef5664c021 (diff)
Core/Config: User-friendlyfy configuration parsing errors
It will now print useful error messages that pinpoint the issue with the config file (missing file, bad syntax, etc) In memory of MitchesD that lost 18 hours finding a problem with his config because of a duplicated line.
Diffstat (limited to 'src/server/authserver/Main.cpp')
-rw-r--r--src/server/authserver/Main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp
index 7c2ed4951c5..69e0d5a1e64 100644
--- a/src/server/authserver/Main.cpp
+++ b/src/server/authserver/Main.cpp
@@ -68,10 +68,10 @@ int main(int argc, char** argv)
if (vm.count("help"))
return 0;
- if (!sConfigMgr->LoadInitial(configFile))
+ std::string configError;
+ if (!sConfigMgr->LoadInitial(configFile, configError))
{
- printf("Invalid or missing configuration file : %s\n", configFile.c_str());
- printf("Verify that the file exists and has \'[authserver]\' written in the top of the file!\n");
+ printf("Error in config file: %s\n", configError.c_str());
return 1;
}