feat: add log when config file not found (#1898)

This commit is contained in:
Shimada666
2024-05-19 20:42:55 +08:00
committed by GitHub
parent 3f1b7117b1
commit 50c2141d20

View File

@@ -316,7 +316,8 @@ def get_llm_config_arg(llm_config_arg: str):
try:
with open('config.toml', 'r', encoding='utf-8') as toml_file:
toml_config = toml.load(toml_file)
except FileNotFoundError:
except FileNotFoundError as e:
logger.error(f'Config file not found: {e}')
return None
except toml.TomlDecodeError as e:
logger.error(f'Cannot parse llm group from {llm_config_arg}. Exception: {e}')