Modify tests to expect the error message to be set when it should be set and then reset it
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
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.
Kind of relates to https://github.com/ros2/rcutils/issues/269
rcl_logging_spdlog
'srcl_logging_external_initialize()
: in case ofrcl_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)rcl_logging_external_initialize()
must/should(?) set an error message if it returnsRCL_LOGGING_RET_ERROR
This results in
rcl_logging_spdlog/test/test_logging_interface.cpp
not generating any "This error state is being overwritten" warnings.