ros-industrial / ros2_canopen

CANopen driver framework for ROS2
https://ros-industrial.github.io/ros2_canopen/manual/rolling/
125 stars 52 forks source link

void DeviceContainer::configure() useless logs #256

Closed LudoJ49 closed 2 months ago

LudoJ49 commented 5 months ago

in ros2_canopen\canopen_core\src\device_container.cpp in function void DeviceContainer::configure() logs are useless as sent after the throw... I have this exception. Trying to figure outwhy...

void DeviceContainer::configure()
{
  if (!this->get_parameter("can_interface_name", can_interface_name_))
  {
    throw DeviceContainerException("Fatal: Getting Parameter failed.");
    RCLCPP_ERROR(this->get_logger(), "Parameter can_interface_name could not be read.");
  }
  if (!this->get_parameter("master_config", dcf_txt_))
  {
    throw DeviceContainerException("Fatal: Getting Parameter failed.");
    RCLCPP_ERROR(this->get_logger(), "Parameter master_config could not be read.");
  }
  if (!this->get_parameter("master_bin", dcf_bin_))
  {
    throw DeviceContainerException("Fatal: Getting Parameter failed.");
    RCLCPP_ERROR(this->get_logger(), "Parameter master_bin could not be read.");
  }