Unverified Commit eed9cced authored by Zaida Zhou's avatar Zaida Zhou Committed by GitHub
Browse files

[Enhancement] Enhance the output of exception (#1309)

parent 4f4eb275
...@@ -251,8 +251,10 @@ class Config: ...@@ -251,8 +251,10 @@ class Config:
base_cfg_dict = dict() base_cfg_dict = dict()
for c in cfg_dict_list: for c in cfg_dict_list:
if len(base_cfg_dict.keys() & c.keys()) > 0: duplicate_keys = base_cfg_dict.keys() & c.keys()
raise KeyError('Duplicate key is not allowed among bases') if len(duplicate_keys) > 0:
raise KeyError('Duplicate key is not allowed among bases. '
f'Duplicate keys: {duplicate_keys}')
base_cfg_dict.update(c) base_cfg_dict.update(c)
# Subtitute base variables from strings to their actual values # Subtitute base variables from strings to their actual values
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment