Skip to content
Snippets Groups Projects
Verified Commit e685b72e authored by Daniel Hornung's avatar Daniel Hornung
Browse files

ENH: Better error message.

parent 3fb770d5
Branches
Tags
2 merge requests!178FIX: #96 Better error output for crawl.py script.,!176misc. small changes
Pipeline #52527 passed
...@@ -173,7 +173,10 @@ class IdentifiableAdapter(metaclass=ABCMeta): ...@@ -173,7 +173,10 @@ class IdentifiableAdapter(metaclass=ABCMeta):
""" """
if node.registered_identifiable is None: if node.registered_identifiable is None:
if raise_exception: if raise_exception:
raise RuntimeError("no registered_identifiable") parents = [p.name for p in node.parents]
parents_str = "\n".join(f"- {p}" for p in parents)
raise RuntimeError("No registered identifiable for node with these parents:\n"
+ parents_str)
else: else:
return False return False
for prop in node.registered_identifiable.properties: for prop in node.registered_identifiable.properties:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment