### What problem does this PR solve?

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2025-07-01 14:05:18 +08:00
committed by GitHub
parent 103027580e
commit e3edcc3064
3 changed files with 8 additions and 3 deletions

View File

@ -83,5 +83,9 @@ def init_root_logger(logfile_basename: str, log_format: str = "%(asctime)-15s %(
def log_exception(e, *args):
logging.exception(e)
for a in args:
logging.error(str(a))
if hasattr(a, "text"):
logging.error(a.text)
raise Exception(a.text)
else:
logging.error(str(a))
raise e