|
18 | 18 | #include "rcutils/error_handling.h" |
19 | 19 |
|
20 | 20 | /// The error handling in RCL is just an alias to the error handling in rcutils. |
21 | | -/** |
22 | | - * Allocators given to functions in rcl are passed along to the error handling |
23 | | - * on a "best effort" basis. |
24 | | - * In some situations, like when NULL is passed for the allocator or something |
25 | | - * else that contains it, the allocator is not available to be passed to the |
26 | | - * RCL_SET_ERROR_MSG macro. |
27 | | - * In these cases, the default allocator rcl_get_default_allocator() is used. |
28 | | - * Since these are considered fatal errors, as opposed to errors that might |
29 | | - * occur during normal runtime, is should be okay to use the default allocator. |
30 | | - */ |
31 | 21 |
|
32 | 22 | typedef rcutils_error_state_t rcl_error_state_t; |
| 23 | +typedef rcutils_error_string_t rcl_error_string_t; |
33 | 24 |
|
34 | | -#define rcl_error_state_copy rcutils_error_state_copy |
35 | | - |
36 | | -#define rcl_error_state_fini rcutils_error_state_fini |
| 25 | +#define rcl_initialize_error_handling_thread_local_storage \ |
| 26 | + rcutils_initialize_error_handling_thread_local_storage |
37 | 27 |
|
38 | 28 | #define rcl_set_error_state rcutils_set_error_state |
39 | 29 |
|
40 | | -#define RCL_CHECK_ARGUMENT_FOR_NULL(argument, error_return_type, allocator) \ |
41 | | - RCUTILS_CHECK_ARGUMENT_FOR_NULL(argument, error_return_type, allocator) |
| 30 | +#define RCL_CHECK_ARGUMENT_FOR_NULL(argument, error_return_type) \ |
| 31 | + RCUTILS_CHECK_ARGUMENT_FOR_NULL(argument, error_return_type) |
42 | 32 |
|
43 | | -#define RCL_CHECK_FOR_NULL_WITH_MSG(value, msg, error_statement, allocator) \ |
44 | | - RCUTILS_CHECK_FOR_NULL_WITH_MSG(value, msg, error_statement, allocator) |
| 33 | +#define RCL_CHECK_FOR_NULL_WITH_MSG(value, msg, error_statement) \ |
| 34 | + RCUTILS_CHECK_FOR_NULL_WITH_MSG(value, msg, error_statement) |
45 | 35 |
|
46 | | -#define RCL_SET_ERROR_MSG(msg, allocator) RCUTILS_SET_ERROR_MSG(msg, allocator) |
| 36 | +#define RCL_SET_ERROR_MSG(msg) RCUTILS_SET_ERROR_MSG(msg) |
47 | 37 |
|
48 | | -#define RCL_SET_ERROR_MSG_WITH_FORMAT_STRING(allocator, fmt_str, ...) \ |
49 | | - RCUTILS_SET_ERROR_MSG_WITH_FORMAT_STRING(allocator, fmt_str, __VA_ARGS__) |
| 38 | +#define RCL_SET_ERROR_MSG_WITH_FORMAT_STRING(fmt_str, ...) \ |
| 39 | + RCUTILS_SET_ERROR_MSG_WITH_FORMAT_STRING(fmt_str, __VA_ARGS__) |
50 | 40 |
|
51 | 41 | #define rcl_error_is_set rcutils_error_is_set |
52 | 42 |
|
53 | 43 | #define rcl_get_error_state rcutils_get_error_state |
54 | 44 |
|
55 | 45 | #define rcl_get_error_string rcutils_get_error_string |
56 | 46 |
|
57 | | -#define rcl_get_error_string_safe rcutils_get_error_string_safe |
58 | | - |
59 | 47 | #define rcl_reset_error rcutils_reset_error |
60 | 48 |
|
61 | 49 | #endif // RCL__ERROR_HANDLING_H_ |
0 commit comments