moveit2
moveit2 copied to clipboard
Add try catch blogs around constructShapeFromMsg
Description
Fixes #1952
The shape constructors called in constructShapeFromMsg throw a runtime_error if it is provided with invalid dimensions (for example here. This PR catches these expectations for better error handling &renames two spartanly named variables.
Checklist
- [ ] Required by CI: Code is auto formatted using clang-format
- [ ] Extend the tutorials / documentation reference
- [ ] Document API changes relevant to the user in the MIGRATION.md notes
- [ ] Create tests, which fail without this PR reference
- [ ] Include a screenshot if changing a GUI
- [ ] While waiting for someone to review your request, please help review another open pull request to support the maintainers
Codecov Report
Attention: Patch coverage is 64.53901%
with 50 lines
in your changes are missing coverage. Please review.
Project coverage is 50.78%. Comparing base (
faa4795
) to head (bf3c6e6
). Report is 106 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #2244 +/- ##
==========================================
+ Coverage 50.35% 50.78% +0.44%
==========================================
Files 390 391 +1
Lines 31954 32157 +203
==========================================
+ Hits 16087 16328 +241
+ Misses 15867 15829 -38
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
It's ok to add try catch blocks, but IMO it would be much better to replace the exceptions with assertions. The named cases are broken API contracts (=coding errors) and not really exceptions.
This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete.
This pull request is in conflict. Could you fix it @sjahr?
This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete.
This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete.