improved yaml error reporting
This commit is contained in:
parent
7b52545501
commit
cd27832eed
@ -71,7 +71,7 @@ void ConfigBuilder::parseFile(const string& fname) {
|
|||||||
|
|
||||||
}else{
|
}else{
|
||||||
match = line.find(':');
|
match = line.find(':');
|
||||||
if (match == string::npos)throw config_error("Invalid line : " + line);
|
if (match == string::npos)throw config_error("Line "+ to_string(currentIndent)+" invalid : |"+line+"|");
|
||||||
string key = line.substr(0, match);
|
string key = line.substr(0, match);
|
||||||
string value = line.substr(match + 1);
|
string value = line.substr(match + 1);
|
||||||
trimSpaces(key);
|
trimSpaces(key);
|
||||||
|
Loading…
Reference in New Issue
Block a user