-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Continue loading classes on error #85
Continue loading classes on error #85
Conversation
c8ce5d4
to
2270586
Compare
+1, great! Because of this, for example
FYI: @future731 jsk-enshu/robot-programming#223 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @furushchev !
I modified the PR to not add new API but use the already existing one. Let me know if there was a strong rationale behind adding API and I can revert my changes if needed
@mikaelarguedas Thank you too! LGTM 👍 |
Note to self: This change will apply only to kinetic and lunar, whether or not to backport will depend on if TinyXML behaves that same way as TinyXML2 on broken xml files |
* continue loading classes on error * construct string with file rather than adding new API * match style of the rest of the file * missing whitespace
any chance this gets backported to indigo, too? |
@ipa-fxm sorry for the late reply. Yes I'm considering this for backport but didnt have time yet to go through various recent PRs and release a new indigo version with some of them bacported. |
@ipa-fxm could you please provide more context regarding why you'd like this to be backported in indigo? Do you have an example of pluginlib failing without this but passing with this patch? It seems to me that the current behavior on kinetic (with this fix) and the one on indigo (without this fix) is the same: "Print the error message if an invalid xml file is found and keep iterating". It appears to me that the fix was needed because kinetic/lunar now use tinyxml2 that behaves differently than TinyXML. So we have to throw an exception rather than just returning (see this PR and especially this commit). |
Hmm, I haven't investigated this with more detail... If you investigated this with more detail, and say the behavior is the same, I think a backport is then not necessary...Thanks I'll re-open a new issue, if our problem really turns out to be related to the plugin-loading mechanism |
Yeah I assumed the same issue would show up on all distros so that's the example I used to test the currently released indigo version. It seems to work. I'll consider providing a better error message (with the name of the culprit file for example) but the functionality should stay unchanged.
Yes, if you can provide a reproducible example that's be great 👍 , I'll happily review contributions to address it |
pluginlib functions stop on error on loading classes, therefore if there is only one invalid or missing plugin xml, all pluginlib functions does not work.
In this pull request, I added
try-catch
on loading each xml file and let this procedure continue on error with printing error message.Currently, for example,
gmapping
package has missing pluginlib xml which fails nodelet working:After the change from this pull request: