rmw  master
C API providing a middleware abstraction layer which is used to implement the rest of ROS.
error_handling.h
Go to the documentation of this file.
1 // Copyright 2014 Open Source Robotics Foundation, Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
23 #ifndef RMW__ERROR_HANDLING_H_
24 #define RMW__ERROR_HANDLING_H_
25 
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30 
31 #include <rcutils/error_handling.h>
32 
35 
38 
41 #define RMW_SAFE_FWRITE_TO_STDERR RCUTILS_SAFE_FWRITE_TO_STDERR
42 
44 
80 #define rmw_initialize_error_handling_thread_local_storage \
81  rcutils_initialize_error_handling_thread_local_storage
82 
84 
97 #define rmw_set_error_state rcutils_set_error_state
98 
100 
107 #define RMW_CHECK_ARGUMENT_FOR_NULL(argument, error_return_type) \
108  RCUTILS_CHECK_ARGUMENT_FOR_NULL(argument, error_return_type)
109 
111 
119 #define RMW_CHECK_FOR_NULL_WITH_MSG(value, msg, error_statement) \
120  RCUTILS_CHECK_FOR_NULL_WITH_MSG(value, msg, error_statement)
121 
123 
132 #define RMW_SET_ERROR_MSG(msg) RCUTILS_SET_ERROR_MSG(msg)
133 
135 
143 #define RMW_SET_ERROR_MSG_WITH_FORMAT_STRING(format_string, ...) \
144  RCUTILS_SET_ERROR_MSG_WITH_FORMAT_STRING(format_string, __VA_ARGS__)
145 
147 
150 #define rmw_error_is_set rcutils_error_is_set
151 
153 
161 #define rmw_get_error_state rcutils_get_error_state
162 
164 
173 #define rmw_get_error_string rcutils_get_error_string
174 
176 #define rmw_reset_error rcutils_reset_error
177 
178 #ifdef __cplusplus
179 }
180 #endif
181 
182 #endif // RMW__ERROR_HANDLING_H_
rmw_error_state_t
rcutils_error_state_t rmw_error_state_t
Struct which encapsulates the error state set by RMW_SET_ERROR_MSG().
Definition: error_handling.h:37
error_handling.h
rcutils_error_string_t
rmw_error_string_t
rcutils_error_string_t rmw_error_string_t
Struct wrapping a fixed-size c string used for returning the formatted error string.
Definition: error_handling.h:34
rcutils_error_state_t