Skip to content

Commit

Permalink
Std::string doesn't have such constructor, therefore wrong exception …
Browse files Browse the repository at this point in the history
…happens when waiting for action server is over (#3333)

* Update bt_action_node.hpp

* Update bt_cancel_action_node.hpp

* Update bt_action_node.hpp

* Update bt_cancel_action_node.hpp
  • Loading branch information
andriimaistruk authored and SteveMacenski committed Feb 10, 2023
1 parent 7657f2f commit 36de17a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ class BtActionNode : public BT::ActionNodeBase
RCLCPP_ERROR(
node_->get_logger(), "\"%s\" action server not available after waiting for 1 s",
action_name.c_str());
throw std::runtime_error(std::string("Action server %s not available", action_name.c_str()));
throw std::runtime_error(
std::string("Action server ") + action_name +
std::string(" not available"));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ class BtCancelActionNode : public BT::ActionNodeBase
RCLCPP_ERROR(
node_->get_logger(), "\"%s\" action server not available after waiting for 1 s",
action_name.c_str());
throw std::runtime_error(std::string("Action server %s not available", action_name.c_str()));
throw std::runtime_error(
std::string("Action server ") + action_name +
std::string(" not available"));
}
}

Expand Down

0 comments on commit 36de17a

Please sign in to comment.