Skip to content

Commit

Permalink
Merge pull request #253 from DigitalSlideArchive/harden-error-logging
Browse files Browse the repository at this point in the history
Harden error logging
  • Loading branch information
manthey authored Sep 3, 2024
2 parents ee0276f + bb71885 commit 2ff4d1b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion imagedephi/redact/redact.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ def redact_images(
)
# Handle and report other errors without stopping the process
except Exception as e:
logger.error(f"{image_file.name} could not be processed. {e.args[0]}")
logger.error(
f"{image_file.name} could not be processed. "
f"{e.args[0] if len(e.args) else e}"
)
continue
if not redaction_plan.is_comprehensive():
logger.info(f"Redaction could not be performed for {image_file.name}.")
Expand Down

0 comments on commit 2ff4d1b

Please sign in to comment.