Skip to content

Commit

Permalink
fix: current vcard file is not printed out when an exception is raised
Browse files Browse the repository at this point in the history
  • Loading branch information
mbideau-atreal committed Jul 16, 2021
1 parent 4b85379 commit 5711855
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions vcardlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,17 @@ def get_vcards_from_files(files, \
logging.error(err)
raise

# any other exception
except Exception as err:
logging.error(
"An exception occured when processing vCard [%d] of file '%s'", count, f_path)
logging.error(err)
logging.error(
"Maybe the file is invalid ? "
"Please ensure it is not empty nor contains weird data "
"and if needed exclude it from the batch and re-run it.")
raise

return vcards


Expand Down

0 comments on commit 5711855

Please sign in to comment.