Skip to content

Commit

Permalink
Add error message
Browse files Browse the repository at this point in the history
  • Loading branch information
enekomartinmartinez committed Jul 1, 2024
1 parent eb6ead7 commit 49e3e44
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pysd/builders/python/subscripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ def subscripts(self, abstract_subscripts: List[AbstractSubscriptRange]):
lastcell=sub.subscripts["lastcell"],
prefix=sub.subscripts["prefix"],
root=self._root).subscript

if not self._subscripts[sub.name]:
raise ValueError(
"Subscript range empty:\n%s" % sub.subscripts)
else:
raise ValueError(
f"Invalid definition of subscript '{sub.name}':\n\t"
Expand Down

0 comments on commit 49e3e44

Please sign in to comment.