Fix StrError, move Format*ErrorMessage to the implementation.
This commit is contained in:
15
format.h
15
format.h
@@ -490,20 +490,15 @@ class UTF16ToUTF8 {
|
||||
#endif
|
||||
|
||||
// Portable thread-safe version of strerror.
|
||||
// Returns a pointer to a string describing the error code. This can be
|
||||
// either a pointer to a string stored in buffer, or a pointer to some
|
||||
// static immutable string. Sets errno to one of the following values:
|
||||
// Sets buffer to point to a string describing the error code.
|
||||
// This can be either a pointer to a string stored in buffer,
|
||||
// or a pointer to some static immutable string.
|
||||
// Returns one of the following values:
|
||||
// 0 - success
|
||||
// ERANGE - buffer is not large enough to store the error message
|
||||
// other - failure
|
||||
// Buffer should be at least of size 1.
|
||||
char *StrError(int error_code, char *buffer, std::size_t buffer_size);
|
||||
|
||||
// Formats a standard C library error message writing the output to out.
|
||||
void FormatCErrorMessage(Writer &out, int error_code, StringRef message);
|
||||
|
||||
// Formats a system error message writing the output to out.
|
||||
void FormatSystemErrorMessage(Writer &out, int error_code, StringRef message);
|
||||
int StrError(int error_code, char *&buffer, std::size_t buffer_size);
|
||||
|
||||
} // namespace internal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user