Skip to content

Commit

Permalink
fix: 修复未知异常导致的软件卡死
Browse files Browse the repository at this point in the history
  • Loading branch information
yodhcn committed Oct 8, 2024
1 parent fefe764 commit 2952b1c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,11 @@ def run_renamer(self, root_path_list: list[str]):

# 执行重命名
for root_path in root_path_list:
renamer.rename(root_path)
try:
renamer.rename(root_path)
except Exception as err:
Renamer.logger.error(f'[Unexpected exception] {str(err)}\n')
break

self.__before_worker_thread_end()

Expand Down

0 comments on commit 2952b1c

Please sign in to comment.