[ros-users] Whole plugin description parsing process aborted on only one error in a description file

Tully Foote tfoote at willowgarage.com
Fri Oct 7 05:16:08 UTC 2011


Thanks for the patch Yoonsoo!

That patch seems to align directly with an open ticket on pluginlib.   I've
added the patch file to the ticket for it
https://code.ros.org/trac/ros-pkg/ticket/5082 we'll try to get it released
shortly.

Tully

On Thu, Oct 6, 2011 at 9:54 PM, Kim, Yoonsoo <yesarang.kim at gmail.com> wrote:

> 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
>
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>


-- 
Tully Foote
Systems Engineer
Willow Garage, Inc.
tfoote at willowgarage.com
(650) 475-2827
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20111006/edc80c9d/attachment-0004.html>


More information about the ros-users mailing list