system_metrics_collector icon indicating copy to clipboard operation
system_metrics_collector copied to clipboard

Improve StringStream handling

Open dabonnie opened this issue 6 years ago • 3 comments

Description

As done in https://github.com/ros-tooling/system_metrics_collector/pull/28, istringstream handling should throw an exception, rather than relying on nested if statements.

Test Plan

  • Manual testing
  • Unit test for new classes

Documentation Plan

  • update class documentation with throws

Release Plan

  • check in PR

Acceptance Criteria

  • [ ] Code has been implemented, reviewed and merged.
  • [ ] Test plan has been completed
  • [ ] Release plan has been completed

Once all above items are checked, this story can be closed.

dabonnie avatar Dec 10 '19 18:12 dabonnie

For context:

 std::stringstream ss
 ss.exceptions(std::ios::failbit | std::ios::badbit);
 // operations on ss go here

zmichaels11 avatar Dec 10 '19 18:12 zmichaels11

It doesn't look like this story is relevant anymore since there is no branching in any code using stringstream. https://github.com/ros-tooling/system_metrics_collector/search?q=stringstream&unscoped_q=stringstream

zmichaels11 avatar May 28 '20 16:05 zmichaels11

It doesn't look like this story is relevant anymore since there is no branching in any code using stringstream. https://github.com/ros-tooling/system_metrics_collector/search?q=stringstream&unscoped_q=stringstream

Updated description, should be istringstream handling.

dabonnie avatar May 28 '20 17:05 dabonnie