Function rcutils_set_error_state

Function Documentation

void rcutils_set_error_state(const char *error_string, const char *file, size_t line_number)

Set the error message, as well as the file and line on which it occurred.

This is not meant to be used directly, but instead via the RCUTILS_SET_ERROR_MSG(msg) macro.

The error_msg parameter is copied into the internal error storage and must be null terminated. The file parameter is copied into the internal error storage and must be null terminated.

Parameters:
  • error_string[in] The error message to set.

  • file[in] The path to the file in which the error occurred.

  • line_number[in] The line number on which the error occurred.