Add semicolons to all RCLCPP and RCUTILS macros. (#565)

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
This commit is contained in:
Chris Lalancette 2018-10-05 17:30:22 -04:00 committed by GitHub
parent eb439ddc73
commit b3cbf06c09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View file

@ -362,7 +362,7 @@ NodeParameters::register_param_change_callback(ParametersCallbackFunction callba
{ {
if (parameters_callback_) { if (parameters_callback_) {
RCUTILS_LOG_WARN("param_change_callback already registered, " RCUTILS_LOG_WARN("param_change_callback already registered, "
"overwriting previous callback") "overwriting previous callback");
} }
parameters_callback_ = callback; parameters_callback_ = callback;
} }

View file

@ -293,7 +293,7 @@ public:
{ {
if (rcl_lifecycle_state_machine_is_initialized(&state_machine_) != RCL_RET_OK) { if (rcl_lifecycle_state_machine_is_initialized(&state_machine_) != RCL_RET_OK) {
RCUTILS_LOG_ERROR("Unable to change state for state machine for %s: %s", RCUTILS_LOG_ERROR("Unable to change state for state machine for %s: %s",
node_base_interface_->get_name(), rcl_get_error_string_safe()) node_base_interface_->get_name(), rcl_get_error_string_safe());
return RCL_RET_ERROR; return RCL_RET_ERROR;
} }
@ -306,7 +306,7 @@ public:
&state_machine_, transition_id, publish_update) != RCL_RET_OK) &state_machine_, transition_id, publish_update) != RCL_RET_OK)
{ {
RCUTILS_LOG_ERROR("Unable to start transition %u from current state %s: %s", RCUTILS_LOG_ERROR("Unable to start transition %u from current state %s: %s",
transition_id, state_machine_.current_state->label, rcl_get_error_string_safe()) transition_id, state_machine_.current_state->label, rcl_get_error_string_safe());
return RCL_RET_ERROR; return RCL_RET_ERROR;
} }
@ -317,14 +317,14 @@ public:
&state_machine_, cb_return_code, publish_update) != RCL_RET_OK) &state_machine_, cb_return_code, publish_update) != RCL_RET_OK)
{ {
RCUTILS_LOG_ERROR("Failed to finish transition %u. Current state is now: %s", RCUTILS_LOG_ERROR("Failed to finish transition %u. Current state is now: %s",
transition_id, state_machine_.current_state->label) transition_id, state_machine_.current_state->label);
return RCL_RET_ERROR; return RCL_RET_ERROR;
} }
// error handling ?! // error handling ?!
// TODO(karsten1987): iterate over possible ret value // TODO(karsten1987): iterate over possible ret value
if (cb_return_code == lifecycle_msgs::msg::Transition::TRANSITION_CALLBACK_ERROR) { if (cb_return_code == lifecycle_msgs::msg::Transition::TRANSITION_CALLBACK_ERROR) {
RCUTILS_LOG_WARN("Error occurred while doing error handling.") RCUTILS_LOG_WARN("Error occurred while doing error handling.");
rcl_lifecycle_transition_key_t error_resolved = execute_callback( rcl_lifecycle_transition_key_t error_resolved = execute_callback(
state_machine_.current_state->id, initial_state); state_machine_.current_state->id, initial_state);
if (error_resolved == lifecycle_msgs::msg::Transition::TRANSITION_CALLBACK_SUCCESS) { if (error_resolved == lifecycle_msgs::msg::Transition::TRANSITION_CALLBACK_SUCCESS) {
@ -332,7 +332,7 @@ public:
if (rcl_lifecycle_trigger_transition( if (rcl_lifecycle_trigger_transition(
&state_machine_, error_resolved, publish_update) != RCL_RET_OK) &state_machine_, error_resolved, publish_update) != RCL_RET_OK)
{ {
RCUTILS_LOG_ERROR("Failed to call cleanup on error state") RCUTILS_LOG_ERROR("Failed to call cleanup on error state");
return RCL_RET_ERROR; return RCL_RET_ERROR;
} }
} else { } else {
@ -340,7 +340,7 @@ public:
if (rcl_lifecycle_trigger_transition( if (rcl_lifecycle_trigger_transition(
&state_machine_, error_resolved, publish_update) != RCL_RET_OK) &state_machine_, error_resolved, publish_update) != RCL_RET_OK)
{ {
RCUTILS_LOG_ERROR("Failed to call cleanup on error state") RCUTILS_LOG_ERROR("Failed to call cleanup on error state");
return RCL_RET_ERROR; return RCL_RET_ERROR;
} }
} }
@ -364,11 +364,11 @@ public:
try { try {
cb_success = callback(State(previous_state)); cb_success = callback(State(previous_state));
} catch (const std::exception &) { } catch (const std::exception &) {
// TODO(karsten1987): Windows CI doens't let me print the msg here // TODO(karsten1987): Windows CI doesn't let me print the msg here
// the todo is to forward the exception to the on_error callback // the todo is to forward the exception to the on_error callback
// RCUTILS_LOG_ERROR("Caught exception in callback for transition %d\n", // RCUTILS_LOG_ERROR("Caught exception in callback for transition %d\n",
// it->first) // it->first);
// RCUTILS_LOG_ERROR("Original error msg: %s\n", e.what()) // RCUTILS_LOG_ERROR("Original error msg: %s\n", e.what());
// maybe directly go for error handling here // maybe directly go for error handling here
// and pass exception along with it // and pass exception along with it
cb_success = lifecycle_msgs::msg::Transition::TRANSITION_CALLBACK_ERROR; cb_success = lifecycle_msgs::msg::Transition::TRANSITION_CALLBACK_ERROR;