Skip to content

Name the forbidden character in the port name error - #1223

Merged
facontidavide merged 1 commit into
BehaviorTree:masterfrom
dv-picknik:fix/1221-port-name-forbidden-char-message
Oct 3, 2026
Merged

facontidavide merged 1 commit into
BehaviorTree:masterfrom
dv-picknik:fix/1221-port-name-forbidden-char-message

Conversation

@dv-picknik

Copy link
Copy Markdown
Contributor

Fixes #1221.

CreatePort now names the character when a port name contains one of the characters rejected since 4.8.4, using the same wording as the XML path:

Port name 'goal.pose' contains forbidden character '.'

Other invalid names, such as name, ID or a leading _ or digit, still get the existing message.

To share the wording, formatForbiddenChar moves from the anonymous namespace in xml_parsing.cpp to basic_types.h/.cpp, next to findForbiddenChar. CreatePort is defined in the header and needs it. This adds one public function and changes no existing signature.

NameValidation.CreatePort_NamesForbiddenChar covers a printable character and a control character. It fails on master and passes with this change. The full suite passes, and so does pre-commit.

🤖 Generated with Claude Code

…ee#1221)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@facontidavide
facontidavide merged commit 68afedf into BehaviorTree:master Oct 3, 2026
16 checks passed
@facontidavide

Copy link
Copy Markdown
Collaborator

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C++ port name error doesn't mention forbidden characters

2 participants