mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user