Skip to content

Commit

Permalink
fix: handle parse errors during watch
Browse files Browse the repository at this point in the history
  • Loading branch information
ruscoder committed Nov 22, 2024
1 parent 13c51da commit f87ae25
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fhirsnake/watch.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ def on_modified(self, event):
def process_file(self, file_path):
try:
resource = load_resource(self.target_dir, file_path)
except Exception:
logging.exception("Unable to load resource %s", file_path)
except Exception as exc:
logging.error("Unable to load resource %s:\a\n%s", file_path, exc)
return

if resource is None:
logging.error("Unable to load resource %s", file_path)
return

resource_type = resource["resourceType"]
Expand Down

0 comments on commit f87ae25

Please sign in to comment.