[roscpp] throw exception on ros::init with empty node name#894
[roscpp] throw exception on ros::init with empty node name#894furushchev wants to merge 2 commits intoros:indigo-develfrom
Conversation
|
at Traceback (most recent call last):
File "/usr/lib/python2.7/unittest/case.py", line 331, in run
testMethod()
File "/tmp/catkin_workspace/src/ros_comm/test/test_rosbag/test/test_bag.py", line 298, in test_get_compression_info
self.assertLess(info.compressed, 1000)
File "/usr/lib/python2.7/unittest/case.py", line 932, in assertLess
self.fail(self._formatMessage(msg, standardMsg))
File "/usr/lib/python2.7/unittest/case.py", line 412, in fail
raise self.failureException(msg)
AssertionError: 1006 not less than 1000it looks not related to my changes. |
|
That looks indeed like a flaky one. @ros-pull-request-builder retest this please |
|
@dirk-thomas Thank you for restarting. However it looks still failed with the same error Traceback (most recent call last):
File "/usr/lib/python2.7/unittest/case.py", line 331, in run
testMethod()
File "/tmp/catkin_workspace/src/ros_comm/test/test_rosbag/test/test_bag.py", line 298, in test_get_compression_info
self.assertLess(info.compressed, 1000)
File "/usr/lib/python2.7/unittest/case.py", line 932, in assertLess
self.fail(self._formatMessage(msg, standardMsg))
File "/usr/lib/python2.7/unittest/case.py", line 412, in fail
raise self.failureException(msg)
AssertionError: 1006 not less than 1000 |
|
|
||
| if (name.empty()) { | ||
| std::stringstream ss; | ||
| ss << "Name [" << name << "] must not be empty"; |
There was a problem hiding this comment.
Since the name is empty anyway (as checked two lines above) there is no need to build the message using stringstream. throw InvalidNameException("The node name must not be empty") should be sufficient.
There was a problem hiding this comment.
@dirk-thomas Thank you for reviewing! I updated my pull request.
2283611 to
a492a9f
Compare
a492a9f to
9555360
Compare
|
Thank you for the improvement. I have cherry picked the changes to the kinetic-devel branch: bd3af70 Please make future PRs against the latest development branch (currently kinetic-devel). |
|
@dirk-thomas Thank you for merging! OK, I'll create pr for kinetic from next time! 👍 |
according to discussion at #891