Made parser exception message more meaningful.
This commit is contained in:
parent
87889f5efe
commit
2245422d0f
@ -54,7 +54,10 @@ void Domain::findSections()
|
||||
[&](const std::string §ionName, auto §ionPosition, const auto value, bool unique = false)
|
||||
{
|
||||
if (unique && sectionPosition != -1)
|
||||
{
|
||||
parser.seek(value);
|
||||
throw utils::ParserException(parser, "Only one \":" + sectionName + "\" section allowed");
|
||||
}
|
||||
|
||||
sectionPosition = value;
|
||||
};
|
||||
|
@ -51,7 +51,10 @@ void Problem::findSections()
|
||||
[&](const std::string §ionName, auto §ionPosition, const auto value, bool unique = false)
|
||||
{
|
||||
if (unique && sectionPosition != -1)
|
||||
{
|
||||
parser.seek(value);
|
||||
throw utils::ParserException(parser, "Only one \":" + sectionName + "\" section allowed");
|
||||
}
|
||||
|
||||
sectionPosition = value;
|
||||
};
|
||||
|
Reference in New Issue
Block a user