Skip to content

Commit

Permalink
Added throw.
Browse files Browse the repository at this point in the history
  • Loading branch information
gremigi-bdai committed Nov 10, 2023
1 parent 595dc77 commit 7588d84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spot_driver_cpp/src/spot_image_publisher_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ SpotImagePublisherNode::SpotImagePublisherNode(const rclcpp::NodeOptions& node_o
auto expected_robot = robot_api->createRobot(address, robot_name);
if (!expected_robot) {
logger->logError(std::string{"Failed to create interface to robot: "}.append(expected_robot.error()));
exit(1);
throw;
}

// Authenticate.
std::shared_ptr<Robot> robot{std::move(expected_robot.value())};
auto auth = robot->authenticate(username, password);
if (!auth) {
logger->logError("Authentication with provided username and password did not succeed.");
exit(1);
throw;
}

internal_ = std::make_unique<SpotImagePublisher>(robot, node_);
Expand Down

0 comments on commit 7588d84

Please sign in to comment.