From c99b7018c69a4845352ad8767601705ae159992d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Wed, 8 Jun 2016 13:34:41 +0200 Subject: [PATCH] Checking that type declarations are not missing. --- src/plasp/pddl/expressions/PrimitiveType.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plasp/pddl/expressions/PrimitiveType.cpp b/src/plasp/pddl/expressions/PrimitiveType.cpp index a7e24d4..97e3aa8 100644 --- a/src/plasp/pddl/expressions/PrimitiveType.cpp +++ b/src/plasp/pddl/expressions/PrimitiveType.cpp @@ -109,7 +109,8 @@ PrimitiveType *PrimitiveType::parseAndFind(Context &context, Domain &domain) const auto typeName = context.parser.parseIdentifier(isIdentifier); - BOOST_ASSERT(!typeName.empty()); + if (typeName.empty()) + throw utils::ParserException(context.parser, "No type supplied"); const auto match = std::find_if(types.cbegin(), types.cend(), [&](const auto &primitiveType)