mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-24 03:17:53 +00:00
Document ThrowSystemError and ThrowWinError.
This commit is contained in:
parent
a59dc93764
commit
3303708e94
@ -50,6 +50,13 @@ Write API
|
||||
|
||||
.. _formatstrings:
|
||||
|
||||
System Error Reporting
|
||||
----------------------
|
||||
|
||||
.. doxygenfunction:: fmt::ThrowSystemError
|
||||
|
||||
.. doxygenfunction:: fmt::ThrowWinError
|
||||
|
||||
Format String Syntax
|
||||
--------------------
|
||||
|
||||
|
16
format.h
16
format.h
@ -1590,9 +1590,9 @@ class SystemErrorSink {
|
||||
/**
|
||||
\rst
|
||||
Formats a message and throws SystemError with the description of the form
|
||||
"<message>: <system-message>", where <message> is the formatted message and
|
||||
<system-message> is the system message corresponding to the error code.
|
||||
error_code is a system error code as given by errno.
|
||||
"<message>: <system-message>", where *<message>* is the formatted message
|
||||
and *<system-message>* is the system message corresponding to the error code.
|
||||
*error_code* is a system error code as given by ``errno``.
|
||||
\endrst
|
||||
*/
|
||||
inline Formatter<SystemErrorSink> ThrowSystemError(
|
||||
@ -1622,10 +1622,14 @@ class WinErrorSink {
|
||||
};
|
||||
|
||||
/**
|
||||
\rst
|
||||
Formats a message and throws SystemError with the description of the form
|
||||
"<message>: <system-message>", where <message> is the formatted message and
|
||||
<system-message> is the system message corresponding to the error code.
|
||||
error_code is a Windows error code as given by GetLastError.
|
||||
"<message>: <system-message>", where *<message>* is the formatted message
|
||||
and *<system-message>* is the system message corresponding to the error code.
|
||||
*error_code* is a Windows error code as given by ``GetLastError``.
|
||||
|
||||
This function is only available on Windows.
|
||||
\endrst
|
||||
*/
|
||||
inline Formatter<WinErrorSink> ThrowWinError(int error_code, StringRef format) {
|
||||
Formatter<WinErrorSink> f(format, WinErrorSink(error_code));
|
||||
|
Loading…
Reference in New Issue
Block a user