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