Skip to content
Snippets Groups Projects
Commit 1cd07b07 authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

ENH: better error message in case of missing definition in cfood for converter

parent 58645183
No related branches found
No related tags found
2 merge requests!198REL: Release 0.10.0,!182Better error message
Pipeline #55115 passed
......@@ -375,6 +375,10 @@ class Converter(object, metaclass=ABCMeta):
The `type` key in the `definition` defines the Converter class which is being used.
"""
if definition is None:
raise RuntimeError("Definition of converter \"{}\" is "
"empty".format(name))
if "type" not in definition:
raise RuntimeError(
"Type is mandatory for converter entries in CFood definition.")
......
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