ros2 / rmw_cyclonedds

ROS 2 RMW layer for Eclipse Cyclone DDS
Apache License 2.0
108 stars 89 forks source link

Improve error message when create_topic fails #405

Closed sloretz closed 1 year ago

sloretz commented 1 year ago

This improves the error message when creating a topic fails. The return codes are the documented return codes for dds_create_topic_generic and dds_create_topic_sertype, which is what create_topic() uses depending on the preprocessor definition DDS_HAS_DDSI_SERTYPE.

https://cyclonedds.io/docs/cyclonedds/latest/api/topic.html#c.dds_create_topic_generic https://cyclonedds.io/docs/cyclonedds/latest/api/topic.html#c.dds_create_topic_sertype

sloretz commented 1 year ago

I'd like this to be backported to Humble - it can probably be backported to other distro's too.

sloretz commented 1 year ago

CI (build: --packages-up-to rmw_cyclonedds_cpp test_rmw_implementation test: --packages-select rmw_cyclonedds_cpp test_rmw_implementation)

sloretz commented 1 year ago

CI re-run since the last commit fixed a typo in a string

sloretz commented 1 year ago

@mergifyio backport humble galactic foxy

mergify[bot] commented 1 year ago

backport humble galactic foxy

✅ Backports have been created

* [#406 Improve error message when create_topic fails (backport #405)](https://github.com/ros2/rmw_cyclonedds/pull/406) has been created for branch `humble` * [#407 Improve error message when create_topic fails (backport #405)](https://github.com/ros2/rmw_cyclonedds/pull/407) has been created for branch `galactic` * [#408 Improve error message when create_topic fails (backport #405)](https://github.com/ros2/rmw_cyclonedds/pull/408) has been created for branch `foxy`