Skip to content

test: Add port validation check after openURL#64

Merged
patrickelectric merged 1 commit intobluerobotics:masterfrom
joaomariolago:add-unhandled-case-init-port
Feb 24, 2025
Merged

test: Add port validation check after openURL#64
patrickelectric merged 1 commit intobluerobotics:masterfrom
joaomariolago:add-unhandled-case-init-port

Conversation

@joaomariolago
Copy link
Copy Markdown
Contributor

No description provided.

auto port = AbstractLink::openUrl(CommandLine::self()->connectionString);
if (!port) {
std::cerr << "Failed to open communication link with device" << std::endl;
return -1;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to add a message inside the AbstractLink as well to print the reason

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added message in different return paths from openURL plus the failed to open since the regex can be valid and still fails to open the port.

@joaomariolago joaomariolago force-pushed the add-unhandled-case-init-port branch from 3553ebf to a605bd4 Compare February 24, 2025 15:58
@patrickelectric patrickelectric merged commit 41faa58 into bluerobotics:master Feb 24, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants