Define RCUTILS_SET_ERROR_MSG_WITH_FORMAT_STRING_AND_APPEND_PREV_ERROR

Define Documentation

RCUTILS_SET_ERROR_MSG_WITH_FORMAT_STRING_AND_APPEND_PREV_ERROR(format_string, ...)

Set the error message with RCUTILS_SET_ERROR_MSG_WITH_FORMAT_STRING and append the previous error. This function sets the error message using the given format string, and appends and resets the latest error string. The resulting formatted string is silently truncated at RCUTILS_ERROR_MESSAGE_MAX_LENGTH.

If there is no previous error, has same behavior as RCUTILS_SET_ERROR_MSG_WITH_FORMAT_STRING.

Parameters:
  • format_string[in] The string to be used as the format of the error message.

  • ...[in] Arguments for the format string.