Define rmw_get_error_string

Define Documentation

rmw_get_error_string

Return the error message followed by , at <file>:<line> if set, else “error not set”.

This function is “safe” because it returns a copy of the current error string or one containing the string “error not set” if no error was set. This ensures that the copy is owned by the calling thread and is therefore never invalidated by other error handling calls, and that the C string inside is always valid and null terminated.

Returns:

The current error string, with file and line number, or “error not set” if not set.