Skip to content
Snippets Groups Projects
Commit 34622aa1 authored by Dominik Burri's avatar Dominik Burri
Browse files

properly raise TypeError and rephrase error message.

parent b7dc184a
No related branches found
No related tags found
1 merge request!91Config validation
This commit is part of merge request !91. Comments created here will be created in the context of that merge request.
......@@ -57,7 +57,8 @@ try:
rule_config = yaml.safe_load(_file)
logger.info(f"Loaded rule_config from {config['optional']['rule_config']}.")
except TypeError:
logger.error(f'No string supplied at field "rule_config", but: {config["optional"]["rule_config"]}')
logger.error(f'No string supplied at field "rule_config", but: {type(config["optional"]["rule_config"])} with content: {config["optional"]["rule_config"]}')
raise
except FileNotFoundError:
logger.error(f"No rule config file found at {config['optional']['rule_config']}. Either provide file or remove rule_config parameter from config.yaml! ")
raise
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment