👍️[Update] Main : error logのトレースバックの処理を集約

This commit is contained in:
misygauziya
2024-12-16 14:22:49 +09:00
parent 8a4721b61d
commit 030b8a9f01
5 changed files with 26 additions and 24 deletions

View File

@@ -138,9 +138,8 @@ class Translator():
source_language=source_language,
target_language=target_language,
)
except Exception:
import traceback
with open('error.log', 'a') as f:
traceback.print_exc(file=f)
except Exception as e:
from utils import errorLogging
errorLogging(e)
result = False
return result