improved yaml error reporting

This commit is contained in:
Thomas 2022-01-10 14:32:52 +01:00
parent 7b52545501
commit cd27832eed
No known key found for this signature in database
GPG Key ID: E538821A6CDFDAD7

View File

@ -71,7 +71,7 @@ void ConfigBuilder::parseFile(const string& fname) {
}else{
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 value = line.substr(match + 1);
trimSpaces(key);