ros2 / rosidl_typesupport

Packages which provide the typesupport for ROS messages and services
Apache License 2.0
13 stars 34 forks source link

Remove rethrow in extern c code #82

Closed brawner closed 3 years ago

brawner commented 3 years ago

rosidl_typesupport_c code had some rethrown exceptions which were inside extern c functions. I believe, but not entirely sure, this is not recommended since there is no way for the C code to handle them and they would otherwise be fatal errors. MSVC's optimizer was also treating this code strangely when I tried to catch the exception from a c++ test and would get different results by adding unrelated changes.

Example failure with fault injection test:

Signed-off-by: Stephen Brawner brawner@gmail.com

brawner commented 3 years ago

Testing --packages-select rosidl_typesupport_c. These tests would not reproduce the failure since they don't include the fault injection test.

brawner commented 3 years ago

Err, fprintf requires const char *

Builds with fault injection:

dirk-thomas commented 3 years ago

@ros-pull-request-builder retest this please (using custom job config from ros-infrastructure/ros_buildfarm#828)

brawner commented 3 years ago

Windows build warning on fault injection jobs is unrelated to this PR (rcl_action).