Skip to content

Commit 9e0e68f

Browse files
committed
Remove preemptive type conversion, allowing empty ports from Groot
see BehaviorTree#854 for more
1 parent 8e7be15 commit 9e0e68f

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

src/xml_parsing.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -703,28 +703,6 @@ TreeNode::Ptr XMLParser::PImpl::createNodeFromXML(const XMLElement* element,
703703
") but not in the providedPorts() of its "
704704
"registered node type."));
705705
}
706-
else
707-
{
708-
const auto& port_model = port_model_it->second;
709-
bool is_blacbkboard = port_value.size() >= 3 && port_value.front() == '{' &&
710-
port_value.back() == '}';
711-
// let's test already if conversion is possible
712-
if(!is_blacbkboard && port_model.converter() && port_model.isStronglyTyped())
713-
{
714-
// This may throw
715-
try
716-
{
717-
port_model.converter()(port_value);
718-
}
719-
catch(std::exception& ex)
720-
{
721-
auto msg = StrCat("The port with name \"", port_name, "\" and value \"",
722-
port_value, "\" can not be converted to ",
723-
port_model.typeName());
724-
throw LogicError(msg);
725-
}
726-
}
727-
}
728706
}
729707

730708
port_remap[port_name] = port_value;

0 commit comments

Comments
 (0)