[ros-users] Whole plugin description parsing process aborted on only one error in a description file
Kim, Yoonsoo
yesarang.kim at gmail.com
Fri Oct 7 04:54:37 UTC 2011
Dear ROS users,
I find that whole plugin description parsing process is aborted on only one
error in a description file.
I don't know whether this is an intentional feature or just a bug but IMO,
it would be better
that the pluginlib display exact error messages and continue the process.
So, I've modified slightly pluginlib/include/class_loader_imp.h and share
the patch here
This patch has been done against ros-electric-pluginlib_1.6.0 package.
Here's the patch
--- patch start ---
*** class_loader_imp.old.h 2011-10-07 13:17:40.573426669 +0900
--- class_loader_imp.h 2011-10-07 13:26:41.662301933 +0900
***************
*** 63,77 ****
TiXmlElement * config = document.RootElement();
if (config == NULL)
{
! ROS_ERROR("XML Document \"%s\" had no Root Element. This likely
means the XML is malformed or missing.", it->c_str());
! return;
}
if (config->ValueStr() != "library" &&
config->ValueStr() != "class_libraries")
{
! ROS_ERROR("The XML given to add must have either \"library\" or \
! \"class_libraries\" as the root tag");
! return ;
}
//Step into the filter list if necessary
if (config->ValueStr() == "class_libraries")
--- 63,77 ----
TiXmlElement * config = document.RootElement();
if (config == NULL)
{
! ROS_ERROR("Skipping XML Document \"%s\" which had no Root Element.
This likely means the XML is malformed or missing.", it->c_str());
! continue;
}
if (config->ValueStr() != "library" &&
config->ValueStr() != "class_libraries")
{
! ROS_ERROR("The XML document \"%s\" given to add must have either
\"library\" or \
! \"class_libraries\" as the root tag", it->c_str());
! continue ;
}
//Step into the filter list if necessary
if (config->ValueStr() == "class_libraries")
--- patch end ---
Best regards,
- Yoonsoo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20111007/050b8b3b/attachment-0003.html>
More information about the ros-users
mailing list