Throw RTDEInvalidKeyException on unknown RTDE key - #544
Merged
urfeex merged 2 commits intoAug 5, 2026
Conversation
This allows parsing information about failed fields. Since RTDEInvalidKeyException inherits from UrException, this is not API-breaking.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #544 +/- ##
==========================================
- Coverage 79.29% 79.15% -0.14%
==========================================
Files 115 115
Lines 6776 6804 +28
Branches 3000 3002 +2
==========================================
+ Hits 5373 5386 +13
- Misses 1035 1050 +15
Partials 368 368
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
urrsk
requested changes
Aug 3, 2026
urrsk
left a comment
Member
There was a problem hiding this comment.
Suggest adding a test covering this improvement
urrsk
approved these changes
Aug 5, 2026
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows parsing information about failed fields. Since RTDEInvalidKeyException inherits from UrException, this is not API-breaking.
This should help in generate an explicit user output in UniversalRobots/Universal_Robots_ROS2_Driver#1551
Note
Low Risk
Narrow change to error typing and exception payload on RTDE recipe validation; still inherits from UrException so existing catch-by-base behavior largely holds, with clearer structured data for new handlers.
Overview
When RTDE output setup fails because recipe keys are unknown to the robot (and unavailable outputs are not ignored), the client now throws
RTDEInvalidKeyExceptioninstead of a genericUrException, carrying the list of bad keys and the existing error text.RTDEInvalidKeyExceptiongains a constructor that acceptsinvalid_keysplus optional message text, and exposesinvalid_keysas a public field so callers (e.g. ROS2 driver) can report which fields failed without parsingwhat().Tests for invalid input/output recipe keys use GMock
ThrowsMessage/HasSubstr, linkrtde_testsagainstgmock_main, and addTestableRTDEClientto exerciseinit()with an injected bad output recipe.Reviewed by Cursor Bugbot for commit 5444044. Bugbot is set up for automated code reviews on this repo. Configure here.