Skip to content

Commit

Permalink
Use a more specific error type than RuntimeError
Browse files Browse the repository at this point in the history
  • Loading branch information
mfisher87 committed Sep 25, 2024
1 parent ea4a0c5 commit b90a10e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion icepyx/core/APIformatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _fmt_temporal(start, end, key):
+ end.strftime("%Y-%m-%dT%H:%M:%S")
)
else:
raise RuntimeError("An invalid time key was submitted for formatting.")
raise ValueError("An invalid time key was submitted for formatting.")

Check warning on line 54 in icepyx/core/APIformatting.py

View check run for this annotation

Codecov / codecov/patch

icepyx/core/APIformatting.py#L54

Added line #L54 was not covered by tests

return {key: fmt_timerange}

Expand Down

0 comments on commit b90a10e

Please sign in to comment.