Skip to content

Commit

Permalink
raise error if file does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
zihaoxu98 committed Aug 29, 2023
1 parent 6903196 commit 3d6fc76
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion appletree/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ def build(self, llh_name: str = None):
else:
self.file_path = file_path

data = load_json(self.file_path)
try:
data = load_json(self.file_path)
except:
raise ValueError(f"Cannot load {self.name} from {self.file_path}!")

coordinate_type = data['coordinate_type']
if coordinate_type == 'point' or coordinate_type == 'log_point':
Expand Down

0 comments on commit 3d6fc76

Please sign in to comment.