Skip to content

Commit

Permalink
Merge pull request #119 from ecmwf/feature/more_explicit_error
Browse files Browse the repository at this point in the history
Feature/more explicit error
  • Loading branch information
mathleur authored Mar 4, 2024
2 parents 522de07 + d9e1823 commit 00f0161
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion polytope/engine/hullslicer.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ def _build_unsliceable_child(self, polytope, ax, node, datacube, lower, next_nod
next_nodes.append(child)
else:
# raise a value not found error
raise ValueError()
errmsg = (
f"Datacube does not have expected index {lower} of type {type(lower)}"
f"on {ax.name} along the path {path}"
)
raise ValueError(errmsg)

def _build_sliceable_child(self, polytope, ax, node, datacube, lower, upper, next_nodes, slice_axis_idx):
tol = ax.tol
Expand Down

0 comments on commit 00f0161

Please sign in to comment.