Skip to content

Commit

Permalink
Added logger when no can device
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Delicat <[email protected]>
  • Loading branch information
delihus committed Nov 5, 2024
1 parent fc5d44f commit 290c4de
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion wibotic_connector_can/src/wibotic_can_driver_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ WiboticCanDriverNode::WiboticCanDriverNode(
DeclareParameters();
GetParameters();

CreateWiboticCanDriver();
try {
CreateWiboticCanDriver();
} catch (const uavcan_linux::Exception & e) {
RCLCPP_FATAL_STREAM(
this->get_logger(), "An occurred error during creating WiboticCanDriver: " << e.what());
throw;
}

wibotic_info_pub_ = this->create_publisher<wibotic_msgs::msg::WiboticInfo>("wibotic_info", 10);

Expand Down

0 comments on commit 290c4de

Please sign in to comment.