carb::extras::convertErrnoToMessage

Defined in carb/extras/Errors.h

inline std::string carb::extras::convertErrnoToMessage(ErrnoType errorCode)

Returns a human-readable string for a given errno value.

On Windows, this value is created from strerror_s(). On other platforms, strerror_r() is used instead. If the GNU version is available it is used, otherwise the XSI-compliant version is used.

Warning

This function does not make any guarantees about the current value of errno or attempts to keep errno set at the same value; errno may be modified by this function.

Parameters

errorCode – the error code read from errno

Returns

text message corresponding to the error code; an errorCode of 0 returns an empty string