Skip to content

Commit 147a5b3

Browse files
committed
plot_pair: Catch FileNotFoundError when reading catalog
1 parent 487de57 commit 147a5b3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

requake/plot/plot_pair.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ def _get_pair():
3737
:raises ValueError: If an error occurs while reading the catalog.
3838
:raises FileNotFoundError: If the catalog file is not found.
3939
"""
40-
catalog = read_stored_catalog()
40+
try:
41+
catalog = read_stored_catalog()
42+
except FileNotFoundError as msg:
43+
logger.error(msg)
44+
rq_exit(1)
4145
fix_non_locatable_events(catalog)
4246
evid1 = config.args.evid1
4347
evid2 = config.args.evid2

0 commit comments

Comments
 (0)