rcutils
master
C API providing common utilities and data structures.
|
#include "rcutils/visibility_control.h"
Go to the source code of this file.
Functions | |
void | rcutils_strerror (char *buffer, size_t buffer_length) |
Retrieve the string corresponding to the last system error. More... | |
void rcutils_strerror | ( | char * | buffer, |
size_t | buffer_length | ||
) |
Retrieve the string corresponding to the last system error.
This function retrieves the value of errno, and calls the system-specific equivalent of strerror
on it, storing the output in the provided buffer. If the error message is longer than the buffer, it will be truncated. The memory for the c-string buffer that is passed in must be managed by the caller.
This function is thread-safe.
[in,out] | buffer | The buffer in which to store the data |
[in] | buffer_length | the maximum length of the buffer |