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)
|
[&](const std::string §ionName, auto §ionPosition, const auto value, bool unique = false)
|
||||||
{
|
{
|
||||||
if (unique && sectionPosition != -1)
|
if (unique && sectionPosition != -1)
|
||||||
|
{
|
||||||
|
parser.seek(value);
|
||||||
throw utils::ParserException(parser, "Only one \":" + sectionName + "\" section allowed");
|
throw utils::ParserException(parser, "Only one \":" + sectionName + "\" section allowed");
|
||||||
|
}
|
||||||
|
|
||||||
sectionPosition = value;
|
sectionPosition = value;
|
||||||
};
|
};
|
||||||
|
@ -51,7 +51,10 @@ void Problem::findSections()
|
|||||||
[&](const std::string §ionName, auto §ionPosition, const auto value, bool unique = false)
|
[&](const std::string §ionName, auto §ionPosition, const auto value, bool unique = false)
|
||||||
{
|
{
|
||||||
if (unique && sectionPosition != -1)
|
if (unique && sectionPosition != -1)
|
||||||
|
{
|
||||||
|
parser.seek(value);
|
||||||
throw utils::ParserException(parser, "Only one \":" + sectionName + "\" section allowed");
|
throw utils::ParserException(parser, "Only one \":" + sectionName + "\" section allowed");
|
||||||
|
}
|
||||||
|
|
||||||
sectionPosition = value;
|
sectionPosition = value;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user