Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
3303708e
Commit
3303708e
authored
May 14, 2014
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document ThrowSystemError and ThrowWinError.
parent
a59dc937
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
doc/index.rst
doc/index.rst
+7
-0
format.h
format.h
+10
-6
No files found.
doc/index.rst
View file @
3303708e
...
...
@@ -50,6 +50,13 @@ Write API
.. _formatstrings:
System Error Reporting
----------------------
.. doxygenfunction:: fmt::ThrowSystemError
.. doxygenfunction:: fmt::ThrowWinError
Format String Syntax
--------------------
...
...
format.h
View file @
3303708e
...
...
@@ -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
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment