Skip to content

Commit

Permalink
Provide clearer error message when Horizons data is not present
Browse files Browse the repository at this point in the history
Closes #92
  • Loading branch information
moble committed Sep 7, 2024
1 parent 4d5858d commit 0e4b91b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sxs/simulations/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ def load_horizons(self):

@property
def horizons(self):
if self.horizons_path not in self.files:
raise ValueError(f"Horizons data is not available for simulation {self.sxs_id}")
if not hasattr(self, "_horizons"):
self._horizons = self.load_horizons()
return self._horizons
Expand Down

0 comments on commit 0e4b91b

Please sign in to comment.