Skip to content
Snippets Groups Projects

Better error message

Merged Alexander Schlemmer requested to merge f-better-error-message into dev
All threads resolved!
@@ -268,6 +268,9 @@ def create_records(values: GeneralStore, records: RecordStore, def_records: dict
c_record = records[name]
if isinstance(record, str):
raise RuntimeError(
"dict expected, but found str: {}".format(record))
for key, value in record.items():
if key == "parents" or key == "role":
continue
@@ -375,6 +378,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.")
Loading