diff --git a/CHANGES.md b/CHANGES.md index 93910baf3e..328f491cdc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,7 +11,8 @@ after the corresponding tracker issues. ## Changes since the last release -- none yet +- Better error message for empty goal. + ## Fast Downward 22.06 diff --git a/src/translate/pddl_parser/parsing_functions.py b/src/translate/pddl_parser/parsing_functions.py index fdc0b9dc80..70ffc0d40f 100644 --- a/src/translate/pddl_parser/parsing_functions.py +++ b/src/translate/pddl_parser/parsing_functions.py @@ -460,7 +460,9 @@ def parse_task_pddl(task_pddl, type_dict, predicate_dict): yield initial goal = next(iterator) - assert goal[0] == ":goal" and len(goal) == 2 + assert goal[0] == ":goal" and len(goal) == 2 and goal[1], ( + "missing or empty goal" + ) yield parse_condition(goal[1], type_dict, predicate_dict) use_metric = False