Throwing exceptions for unsupported features instead of silently accepting them.

This commit is contained in:
2017-06-24 20:27:01 +02:00
parent 2b0b6570ea
commit ca02b8ce62
19 changed files with 86 additions and 168 deletions

View File

@@ -53,13 +53,7 @@ inline void translatePredicate(colorlog::ColorStream &outputStream, const ::pddl
outputStream << *variable;
};
const auto handleUnsupported =
[&](const auto &)
{
throw TranslatorException("only variables and constants supported in predicates currently");
};
argument.match(handleConstant, handleVariable, handleUnsupported);
argument.match(handleConstant, handleVariable);
}
outputStream << ")";