Skip to content

Commit c577dfe

Browse files
committed
Improve error messages
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
1 parent 62c1da7 commit c577dfe

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pyiron_workflow/mixin/semantics.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ def parent_type(cls) -> type[ParentType]:
5959
def _check_label(self, new_label: str) -> None:
6060
super()._check_label(new_label)
6161
if self.semantic_delimiter in new_label:
62-
raise ValueError(f"{self.semantic_delimiter} cannot be in the label")
62+
raise ValueError(
63+
f"Semantic delimiter {self.semantic_delimiter} cannot be in new label "
64+
f"{new_label}"
65+
)
6366

6467
@property
6568
def parent(self) -> ParentType | None:
@@ -117,8 +120,8 @@ def semantic_path(self) -> str:
117120
raise ValueError(
118121
f"The parent and detached path should not be able to take non-None "
119122
f"values simultaneously, but got {self.parent} and "
120-
f"{self.detached_parent_path}, respectively. Please raise an issue on GitHub "
121-
f"outlining how your reached this state."
123+
f"{self.detached_parent_path}, respectively. Please raise an issue on "
124+
f"GitHub outlining how your reached this state."
122125
)
123126
return prefix + self.semantic_delimiter + self.label
124127

0 commit comments

Comments
 (0)