From 4d87c1223b4c6e70ba124f7963d7f59408a444e0 Mon Sep 17 00:00:00 2001 From: Griswald Brooks Date: Thu, 9 Apr 2026 17:39:20 -0400 Subject: [PATCH] 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) --- src/xml_parsing.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xml_parsing.cpp b/src/xml_parsing.cpp index 5e38910d9..17edf2708 100644 --- a/src/xml_parsing.cpp +++ b/src/xml_parsing.cpp @@ -673,9 +673,9 @@ TreeNode::Ptr XMLParser::PImpl::createNodeFromXML(const XMLElement* element, auto port_model_it = manifest->ports.find(port_name); if(port_model_it == manifest->ports.end()) { - throw RuntimeError(StrCat("a port with name [", port_name, - "] is found in the XML (<", element->Name(), - ">, line ", std::to_string(att->GetLineNum()), + throw RuntimeError(StrCat("A port with name [", port_name, + "] is found in the XML (", type_ID, ", line ", + std::to_string(element->GetLineNum()), ") but not in the providedPorts() of its " "registered node type.")); }