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:
1 parent
833195062c
commit
0e52b111f3
5 files changed
+23
-15
No files matched your search
@@ -31,7 +31,7 @@ class ConfigMgr
|
||||
|
||||
public:
|
||||
/// Method used only for loading main configuration files (authserver.conf and worldserver.conf)
|
||||
bool LoadInitial(std::string const& file);
|
||||
bool LoadInitial(std::string const& file, std::string& error);
|
||||
|
||||
static ConfigMgr* instance()
|
||||
{
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
return &instance;
|
||||
}
|
||||
|
||||
bool Reload();
|
||||
bool Reload(std::string& error);
|
||||
|
||||
std::string GetStringDefault(std::string const& name, const std::string& def);
|
||||
bool GetBoolDefault(std::string const& name, bool def);
|
||||
|
||||
Reference in new issue
Block a user