carb::extras::getLastErrnoMessage

Defined in carb/extras/Errors.h

inline std::string carb::extras::getLastErrnoMessage(ErrnoType *out = nullptr)

Reads the current value of errno and returns a human-readable string for the errno value.

Note

Unlike convertErrnoToMessage(), this function ensures that errno remains consistent by setting errno to the same value after creating the string.

Parameters

out[out] If not nullptr, receives the value of errno.

Returns

string value from convertErrnoToMessage()