Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
catches exception when preprocessing file to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Feb 15, 2015
1 parent c21e7e7 commit f1d7b83
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pyquickhelper/filehelper/ftp_transfer_files.py
Expand Up @@ -210,7 +210,10 @@ def preprocess_before_transfering(self, path):
content = spl[0] + self._footer_html + "</body>" + spl[-1]

# filter
content = self._content_filter(content)
try:
content = self._content_filter(content)
except Exception as e :
raise FolderTransferFTPException("File {0} cannot be transferred (exception)".format(path)) from e
if content is None:
raise FolderTransferFTPException("File {0} cannot be transferred due to its content".format(path))

Expand Down

0 comments on commit f1d7b83

Please sign in to comment.