Skip to content

Commit 1d1d8ae

Browse files
committed
Clearer error message
1 parent 08a7f74 commit 1d1d8ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

neo/core/objectlist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def _handle_append(self, obj):
3434
raise TypeError(f"Object is a {type(obj)}. It should be one of {self.allowed_contents}.")
3535

3636
if self._contains(obj):
37-
raise ValueError("Cannot add the same object twice")
37+
raise ValueError("Cannot add this object because it is already contained within the list")
3838

3939
# set the child-parent relationship
4040
if self.parent:

0 commit comments

Comments
 (0)