Skip to content

Commit 456baa0

Browse files
committed
(fix) unused variable
1 parent e26913c commit 456baa0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

rclcpp/test/test_externally_defined_services.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ TEST_F(TestExternallyDefinedServices, default_behavior) {
4848
auto srv = node_handle->create_service<rclcpp::srv::Mock>("test",
4949
callback);
5050
EXPECT_STREQ(srv->get_service_name().c_str(), "test");
51-
} catch (const std::exception & e) {
51+
} catch (const std::exception &) {
5252
FAIL();
5353
return;
5454
}
@@ -69,7 +69,7 @@ TEST_F(TestExternallyDefinedServices, extern_defined_uninitialized) {
6969
try {
7070
rclcpp::service::Service<rclcpp::srv::Mock>(node_handle->get_shared_node_handle(),
7171
&service_handle, cb);
72-
} catch (const std::runtime_error & e) {
72+
} catch (const std::runtime_error &) {
7373
SUCCEED();
7474
return;
7575
}
@@ -97,7 +97,7 @@ TEST_F(TestExternallyDefinedServices, extern_defined_initialized) {
9797
try {
9898
rclcpp::service::Service<rclcpp::srv::Mock>(node_handle->get_shared_node_handle(),
9999
&service_handle, cb);
100-
} catch (const std::runtime_error & e) {
100+
} catch (const std::runtime_error &) {
101101
FAIL();
102102
return;
103103
}

rclcpp_lifecycle/src/lifecycle_node_impl.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ class LifecycleNode::LifecycleNodeImpl
204204
} catch (const std::exception & e) {
205205
fprintf(stderr, "Caught exception in callback for transition %d\n",
206206
it->first);
207+
fprintf(stderr, "Original error msg: %s\n", e.what());
207208
cb_success = false;
208209
}
209210
} else {

0 commit comments

Comments
 (0)