Skip to content

Commit 4d87c12

Browse files
18029 Fix misleading error message for unrecognized behavior ports
Use type_ID instead of element->Name() so the error prints the actual behavior name (e.g. GetEpickObjectDetectionStatus) rather than the generic XML tag (e.g. Action). Use element->GetLineNum() instead of att->GetLineNum() for a correct line number. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c852132 commit 4d87c12

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/xml_parsing.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -673,9 +673,9 @@ TreeNode::Ptr XMLParser::PImpl::createNodeFromXML(const XMLElement* element,
673673
auto port_model_it = manifest->ports.find(port_name);
674674
if(port_model_it == manifest->ports.end())
675675
{
676-
throw RuntimeError(StrCat("a port with name [", port_name,
677-
"] is found in the XML (<", element->Name(),
678-
">, line ", std::to_string(att->GetLineNum()),
676+
throw RuntimeError(StrCat("A port with name [", port_name,
677+
"] is found in the XML (", type_ID, ", line ",
678+
std::to_string(element->GetLineNum()),
679679
") but not in the providedPorts() of its "
680680
"registered node type."));
681681
}

0 commit comments

Comments
 (0)