15 #ifndef RMW__ERROR_HANDLING_H_ 16 #define RMW__ERROR_HANDLING_H_ 67 #define RMW_SET_ERROR_MSG(msg) rmw_set_error_state(msg, __FILE__, __LINE__); 120 #endif // RMW__ERROR_HANDLING_H_ #define RMW_PUBLIC
Definition: visibility_control.h:48
struct rmw_error_state_t rmw_error_state_t
Struct which encapsulates the error state set by RMW_SET_ERROR_MSG().
const char * rmw_get_error_string(void)
Return the error message followed by , at <file>:<line>, or NULL.
const char * rmw_get_error_string_safe(void)
Return the error message followed by , at <file>:<line> if set, else "error not set".
const rmw_error_state_t * rmw_get_error_state(void)
Return an rmw_error_state_t which was set with rmw_set_error_state().
void rmw_set_error_state(const char *error_msg, const char *file, size_t line_number)
Set the error message, as well as the file and line on which it occurred.
const char * message
Definition: error_handling.h:32
bool rmw_error_is_set(void)
Return true if the error is set, otherwise false.
void rmw_reset_error(void)
Resets the error state by clearing any previously set error state.
const char * file
Definition: error_handling.h:33
size_t line_number
Definition: error_handling.h:34
Struct which encapsulates the error state set by RMW_SET_ERROR_MSG().
Definition: error_handling.h:30