Skip to content

Commit

Permalink
Merge pull request #203 from tschaub/exception-order
Browse files Browse the repository at this point in the history
Reorder exception handlers to avoid unreachable code
  • Loading branch information
jonhealy1 authored Mar 15, 2022
2 parents 3abf536 + f5b0b48 commit c1b4a72
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ All notable changes to this project will be documented in this file.

The format is (loosely) based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## [3.0.0] - 2022-03-11
## Unreleased - 2022-03-14

### Fixed

- Reordered exception handlers to avoid unreachable code

## [v3.0.0] - 2022-03-11

### Added

Expand Down
4 changes: 2 additions & 2 deletions stac_validator/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,12 @@ def run(cls):
cls.valid = True
message = cls.default_validator(stac_type)

except ValueError as e:
message.update(cls.create_err_msg("ValueError", str(e)))
except URLError as e:
message.update(cls.create_err_msg("URLError", str(e)))
except JSONDecodeError as e:
message.update(cls.create_err_msg("JSONDecodeError", str(e)))
except ValueError as e:
message.update(cls.create_err_msg("ValueError", str(e)))
except TypeError as e:
message.update(cls.create_err_msg("TypeError", str(e)))
except FileNotFoundError as e:
Expand Down

0 comments on commit c1b4a72

Please sign in to comment.