-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up error handling in many rcl{_action,_lifecycle} codepaths (#1202
) * Shorten the delay in test_action_server setup. Instead of waiting 250ms between setting up 10 goals (for at least 2.5 seconds), just wait 100ms which reduces this to 1 second. Signed-off-by: Chris Lalancette <[email protected]> * Small style cleanups in test_action_server.cpp Signed-off-by: Chris Lalancette <[email protected]> * Reset the error in rcl_node_type_cache_register_type(). That is, if rcutils_hash_map_set() fails, it sets its own error, so overriding it with our own will cause a warning to print. Make sure to clear it before setting our own. Signed-off-by: Chris Lalancette <[email protected]> * Only unregister a clock jump callback if we have installed it. This avoids a warning on cleanup in rcl_timer_init2. Signed-off-by: Chris Lalancette <[email protected]> * Record the return value from rcl_node_type_cache_register_type. Otherwise, in a failure situation we set the error but we actually return RCL_RET_OK to the upper layers, which is odd. Signed-off-by: Chris Lalancette <[email protected]> * Get rid of completely unnecessary return value translation. This generated code was translating an RCL error to an RCL error, which doesn't make much sense. Just remove the duplicate code. Signed-off-by: Chris Lalancette <[email protected]> * Use the rcl_timer_init2 functionality to start the timer disabled. Rather than starting it enabled, and then immediately canceling it. Signed-off-by: Chris Lalancette <[email protected]> * Don't overwrite the error from rcl_action_goal_handle_get_info() It already sets the error, so rcl_action_server_goal_exists() should not set it again. Signed-off-by: Chris Lalancette <[email protected]> * Reset errors before setting new ones when checking action validity That way we avoid an ugly warning in the error paths. Signed-off-by: Chris Lalancette <[email protected]> * Move the copying of the options earlier in rcl_subscription_init. That way when we go to cleanup in the "fail" case, the options actually exist and are valid. This avoids an ugly warning during cleanup. Signed-off-by: Chris Lalancette <[email protected]> * Make sure to set the error on failure of rcl_action_get_##_service_name This makes it match the generated code for the action_client. Signed-off-by: Chris Lalancette <[email protected]> * Reset the errors during RCUTILS_FAULT_INJECTION testing. That way subsequent failures won't print out ugly error strings. Signed-off-by: Chris Lalancette <[email protected]> * Make sure to return errors in _rcl_parse_resource_match . That is, if rcl_lexer_lookahead2_expect() returns an error, we should pass that along to higher layers rather than just ignoring it. Signed-off-by: Chris Lalancette <[email protected]> * Don't overwrite error by rcl_validate_enclave_name. It leads to ugly warnings. Signed-off-by: Chris Lalancette <[email protected]> * Add acomment that rmw_validate_namespace_with_size sets the error Signed-off-by: Chris Lalancette <[email protected]> * Make sure to reset error in rcl_node_type_cache_init. Otherwise we get a warning about overwriting the error from rcutils_hash_map_init. Signed-off-by: Chris Lalancette <[email protected]> * Conditionally set error message in rcl_publisher_is_valid. Only when rcl_context_is_valid doesn't set the error. Signed-off-by: Chris Lalancette <[email protected]> * Don't overwrite error from rcl_node_get_logger_name. It already sets the error in the failure case. Signed-off-by: Chris Lalancette <[email protected]> * Make sure to reset errors when testing network flow endpoints. That's because some of the RMW implementations may not support this feature, and thus set errors. Signed-off-by: Chris Lalancette <[email protected]> * Make sure to reset errors in rcl_expand_topic_name. That way we can set more useful errors for the upper layers. Signed-off-by: Chris Lalancette <[email protected]> * Cleanup wait.c error handling. In particular, make sure to not overwrite errors as we get into error-handling paths, which should clean up warnings we get. Signed-off-by: Chris Lalancette <[email protected]> * Make sure to reset errors in rcl_lifecycle tests. That way we won't get ugly "overwritten" warnings on subsequent tests. Signed-off-by: Chris Lalancette <[email protected]> --------- Signed-off-by: Chris Lalancette <[email protected]>
- Loading branch information
1 parent
2a72dba
commit 39a5ba8
Showing
19 changed files
with
97 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.