Skip to content

Commit

Permalink
Merge pull request #855 from AFM-SPM/maxgamill-sheffield/853-log_avai…
Browse files Browse the repository at this point in the history
…l_channels

add orig err msg in broad channel try/except
  • Loading branch information
MaxGamill-Sheffield committed Jun 6, 2024
2 parents 389fb10 + 2d9d15a commit 1615fc9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions topostats/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,7 @@ def get_data(self) -> None:
self.image, self.pixel_to_nm_scaling = suffix_to_loader[suffix]()
except Exception as e:
if "Channel" in str(e) and "not found" in str(e):
LOGGER.warning(e) # log the specific error message
LOGGER.warning(f"[{self.filename}] Channel {self.channel} not found, skipping image.")
else:
raise
Expand Down

0 comments on commit 1615fc9

Please sign in to comment.