Skip to content

Commit 1563ee9

Browse files
committed
yamlutils: print current object for debugging
1 parent 23705fe commit 1563ee9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

linkml_runtime/utils/yamlutils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ def __post_init__(self, *args: List[str], **kwargs):
4545
for k in kwargs.keys():
4646
v = repr(kwargs[k])[:40].replace('\n', '\\n')
4747
messages.append(f"{TypedNode.yaml_loc(k)} Unknown argument: {k} = {v}")
48-
raise ValueError('\n'.join(messages))
48+
msg = f"Unknown arguments for: {self}\n"
49+
msg += '\n'.join(messages)
50+
raise ValueError(msg)
4951

5052
def _default(self, obj, filtr: Callable[[dict], dict] = None):
5153
""" JSON serializer callback.

0 commit comments

Comments
 (0)