Skip to content

Commit 65e0cab

Browse files
authored
Remove unnecessary error reporting. (#352)
The rosidl_stringify_type_hash() function already sets the error when it fails, so we should not do it again (this leads to some ugly output). Signed-off-by: Chris Lalancette <[email protected]>
1 parent 49a34bf commit 65e0cab

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

rmw_zenoh_cpp/src/detail/rmw_client_data.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ std::shared_ptr<ClientData> ClientData::make(
100100
*allocator,
101101
&type_hash_c_str);
102102
if (RCUTILS_RET_BAD_ALLOC == stringify_ret) {
103-
RMW_SET_ERROR_MSG("Failed to allocate type_hash_c_str.");
103+
// rosidl_stringify_type_hash already set the error
104104
return nullptr;
105105
}
106106
auto free_type_hash_c_str = rcpputils::make_scope_exit(

rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ std::shared_ptr<PublisherData> PublisherData::make(
7474
*allocator,
7575
&type_hash_c_str);
7676
if (RCUTILS_RET_BAD_ALLOC == stringify_ret) {
77-
RMW_SET_ERROR_MSG("Failed to allocate type_hash_c_str.");
77+
// rosidl_stringify_type_hash already set the error
7878
return nullptr;
7979
}
8080
auto always_free_type_hash_c_str = rcpputils::make_scope_exit(

rmw_zenoh_cpp/src/detail/rmw_service_data.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ std::shared_ptr<ServiceData> ServiceData::make(
9595
*allocator,
9696
&type_hash_c_str);
9797
if (RCUTILS_RET_BAD_ALLOC == stringify_ret) {
98-
RMW_SET_ERROR_MSG("Failed to allocate type_hash_c_str.");
98+
// rosidl_stringify_type_hash already set the error
9999
return nullptr;
100100
}
101101
auto free_type_hash_c_str = rcpputils::make_scope_exit(

rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ std::shared_ptr<SubscriptionData> SubscriptionData::make(
8888
*allocator,
8989
&type_hash_c_str);
9090
if (RCUTILS_RET_BAD_ALLOC == stringify_ret) {
91-
RMW_SET_ERROR_MSG("Failed to allocate type_hash_c_str.");
91+
// rosidl_stringify_type_hash already set the error
9292
return nullptr;
9393
}
9494
auto free_type_hash_c_str = rcpputils::make_scope_exit(

0 commit comments

Comments
 (0)