Skip to content

Conversation

@christophebedard
Copy link
Member

@christophebedard christophebedard commented Feb 28, 2024

Kind of relates to ros2/rcutils#269

  1. Modify tests to expect the error message to be set when it should be set and then reset it
  2. In rcl_logging_spdlog's rcl_logging_external_initialize(): in case of rcl_logging_get_logging_directory() failure, append error message instead of overwriting it without resetting it (and thus generating a "This error state is being overwritten" warning)
    • The error message looks like:
      Failed to get logging directory: rcutils_join_path failed, at /home/user/ros2_ws/src/ros2/rcl_logging/rcl_logging_interface/src/logging_dir.c:59, at /home/user/ros2_ws/src/ros2/rcl_logging/rcl_logging_spdlog/src/rcl_logging_spdlog.cpp:136
      
  3. Document that rcl_logging_external_initialize() must/should(?) set an error message if it returns RCL_LOGGING_RET_ERROR

This results in rcl_logging_spdlog/test/test_logging_interface.cpp not generating any "This error state is being overwritten" warnings.

@christophebedard
Copy link
Member Author

This is a draft pending higher-level discussion for overall error message handling.

Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In short, this seems reasonable to me. I'm going to hold off on approving since this is still a draft and we need to have the higher-level discussion.

Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

draft looks good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants