Skip to content

Commit

Permalink
Added extra text on error
Browse files Browse the repository at this point in the history
  • Loading branch information
Framba-Luca committed Oct 16, 2023
1 parent dc3e720 commit 08b4cf5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion unified_planning/model/walkers/state_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def evaluate(
self._state = state
r = self.walk(expression)
self._variable_assignments = None
self._exp = expression
assert r.is_constant()
return r

Expand All @@ -79,5 +80,5 @@ def walk_fluent_exp(self, expression: "FNode", args: List["FNode"]) -> "FNode":

def walk_param_exp(self, expression: "FNode", args: List["FNode"]) -> "FNode":
raise UPProblemDefinitionError(
f"The StateEvaluator.evaluate should only be called on grounded expressions but is called on the parameter: {expression}"
f"The StateEvaluator.evaluate should only be called on grounded expressions but is called on the parameter: {expression} in exp {self._exp}"
)

0 comments on commit 08b4cf5

Please sign in to comment.