rcl  master
C API providing common ROS client library functionality.
Macros | Typedefs
error_handling.h File Reference
#include "rcutils/error_handling.h"

Go to the source code of this file.

Macros

#define rcl_error_state_copy   rcutils_error_state_copy
 
#define rcl_error_state_fini   rcutils_error_state_fini
 
#define rcl_set_error_state   rcutils_set_error_state
 
#define RCL_SET_ERROR_MSG(msg, allocator)   RCUTILS_SET_ERROR_MSG(msg, allocator)
 
#define rcl_error_is_set   rcutils_error_is_set
 
#define rcl_get_error_state   rcutils_get_error_state
 
#define rcl_get_error_string   rcutils_get_error_string
 
#define rcl_get_error_string_safe   rcutils_get_error_string_safe
 
#define rcl_reset_error   rcutils_reset_error
 

Typedefs

typedef rcutils_error_state_t rcl_error_state_t
 The error handling in RCL is just an alias to the error handling in rcutils. More...
 

Macro Definition Documentation

◆ rcl_error_state_copy

#define rcl_error_state_copy   rcutils_error_state_copy

◆ rcl_error_state_fini

#define rcl_error_state_fini   rcutils_error_state_fini

◆ rcl_set_error_state

#define rcl_set_error_state   rcutils_set_error_state

◆ RCL_SET_ERROR_MSG

#define RCL_SET_ERROR_MSG (   msg,
  allocator 
)    RCUTILS_SET_ERROR_MSG(msg, allocator)

◆ rcl_error_is_set

#define rcl_error_is_set   rcutils_error_is_set

◆ rcl_get_error_state

#define rcl_get_error_state   rcutils_get_error_state

◆ rcl_get_error_string

#define rcl_get_error_string   rcutils_get_error_string

◆ rcl_get_error_string_safe

#define rcl_get_error_string_safe   rcutils_get_error_string_safe

◆ rcl_reset_error

#define rcl_reset_error   rcutils_reset_error

Typedef Documentation

◆ rcl_error_state_t

The error handling in RCL is just an alias to the error handling in rcutils.

Allocators given to functions in rcl are passed along to the error handling on a "best effort" basis. In some situations, like when NULL is passed for the allocator or something else that contains it, the allocator is not available to be passed to the RCL_SET_ERROR_MSG macro. In these cases, the default allocator rcl_get_default_allocator() is used. Since these are considered fatal errors, as opposed to errors that might occur during normal runtime, is should be okay to use the default allocator.