diff options
| author | DDuarte <dnpd.dd@gmail.com> | 2014-07-29 01:47:00 +0100 |
|---|---|---|
| committer | DDuarte <dnpd.dd@gmail.com> | 2014-07-29 01:47:00 +0100 |
| commit | 0e52b111f3731611ff6c5be2bf0bd849d4e012fb (patch) | |
| tree | b2f1f6a1b16ab79078fdce924e088ca162b630db /src/server/game/World | |
| parent | 833195062c310685b479ed16ff4ac5ef5664c021 (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/game/World')
| -rw-r--r-- | src/server/game/World/World.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 533fbe6b2a4..bc1058d931d 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -408,9 +408,10 @@ void World::LoadConfigSettings(bool reload) { if (reload) { - if (!sConfigMgr->Reload()) + std::string configError; + if (!sConfigMgr->Reload(configError)) { - TC_LOG_ERROR("misc", "World settings reload fail: can't read settings from %s.", sConfigMgr->GetFilename().c_str()); + TC_LOG_ERROR("misc", "World settings reload fail: %s.", configError.c_str()); return; } sLog->LoadFromConfig(); |
