diff --git a/src/plasp/pddl/Domain.cpp b/src/plasp/pddl/Domain.cpp index fb3c70d..450f28c 100644 --- a/src/plasp/pddl/Domain.cpp +++ b/src/plasp/pddl/Domain.cpp @@ -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; }; diff --git a/src/plasp/pddl/Problem.cpp b/src/plasp/pddl/Problem.cpp index 0b63633..5b92488 100644 --- a/src/plasp/pddl/Problem.cpp +++ b/src/plasp/pddl/Problem.cpp @@ -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; };