From 718cc47fe912dc01f05f515552220e5211aa1e7a Mon Sep 17 00:00:00 2001 From: Jacob Hassold Date: Mon, 15 Apr 2019 16:03:50 -0400 Subject: [PATCH] Re-ordered functions to allow compilation Signed-off-by: Jacob Hassold --- rclcpp/src/rclcpp/exceptions.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/rclcpp/src/rclcpp/exceptions.cpp b/rclcpp/src/rclcpp/exceptions.cpp index 5b8e79ea6b..6f5c40f464 100644 --- a/rclcpp/src/rclcpp/exceptions.cpp +++ b/rclcpp/src/rclcpp/exceptions.cpp @@ -39,20 +39,6 @@ NameValidationError::format_error( return msg; } -void -throw_from_rcl_error( - rcl_ret_t ret, - const std::string & prefix, - const rcl_error_state_t * error_state, - void (* reset_error)()) -{ - // We expect this to either throw a standard error, - // or to generate an error pointer (which is caught - // in err, and immediately thrown) - auto err = from_rcl_error(rt, prefix, error_state, reset_error); - std::rethrow_exception(err); -} - std::exception_ptr from_rcl_error( rcl_ret_t ret, @@ -87,6 +73,20 @@ from_rcl_error( } } +void +throw_from_rcl_error( + rcl_ret_t ret, + const std::string & prefix, + const rcl_error_state_t * error_state, + void (* reset_error)()) +{ + // We expect this to either throw a standard error, + // or to generate an error pointer (which is caught + // in err, and immediately thrown) + auto err = from_rcl_error(ret, prefix, error_state, reset_error); + std::rethrow_exception(err); +} + RCLErrorBase::RCLErrorBase(rcl_ret_t ret, const rcl_error_state_t * error_state) : ret(ret), message(error_state->message), file(error_state->file), line(error_state->line_number), formatted_message(rcl_get_error_string().str)