Skip to content

Commit

Permalink
improve error message wording
Browse files Browse the repository at this point in the history
Co-authored by: Darren Burns <darrenburns@users.noreply.github.com>
  • Loading branch information
TomJGooding committed Jul 18, 2024
1 parent a7ddde8 commit 04ac1ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/textual/widgets/_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def add(
insert_index = self.children.index(before)
except ValueError:
raise AddNodeError(
"Request to add before an unknown node that is not a child of this node"
"The node specified for `before` is not a child of this node"
)
else:
raise TypeError(
Expand All @@ -381,7 +381,7 @@ def add(
insert_index = self.children.index(after) + 1
except ValueError:
raise AddNodeError(
"Request to add after an unknown node that is not a child of this node"
"The node specified for `after` is not a child of this node"
)
else:
raise TypeError(
Expand Down

0 comments on commit 04ac1ca

Please sign in to comment.