diff --git a/ltsdb_json.py b/ltsdb_json.py index d943642..b123668 100644 --- a/ltsdb_json.py +++ b/ltsdb_json.py @@ -42,6 +42,9 @@ class LTS: fcntl.flock(fh, fcntl.LOCK_EX) json.dump({"description": self.description, "data": self.data}, fh) self.rebuild_index() + except json.decoder.JSONDecodeError as e: + log.exception(f"Cannot decode JSON in {self.filename}: {e}") + raise def pop(self, i): # Pop the element at index i and adjust the min/max values of the