Skip to content

Commit

Permalink
Add error message when no files were loaded
Browse files Browse the repository at this point in the history
Co-authored-by: Zachary Moon <[email protected]>
  • Loading branch information
mbruckner-work and zmoon authored Oct 4, 2024
1 parent dab1098 commit 3188f6a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions monetio/sat/_omps_nadir_mm.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def read_OMPS_nm(files):
data_array = xr.concat([data_array, data], "x")
except (KeyError, ValueError) as e:
print(f"warning: skipping {filename}. {type(e).__name__} occured: {e}")
if count == 0:
raise RuntimeError(f"no files loaded from files={files}")
return data_array


Expand Down

0 comments on commit 3188f6a

Please sign in to comment.