From d2e7554f7477e7f817835baa4776ee24539190ae Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 14 May 2014 07:29:47 -0700 Subject: [PATCH] Write docs. --- doc/index.rst | 7 +++++-- format.h | 16 +++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/doc/index.rst b/doc/index.rst index 4e6c6211..5e53f4a7 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -50,8 +50,11 @@ Write API .. _formatstrings: -System Error Reporting ----------------------- +System Errors +------------- + +.. doxygenclass:: fmt::SystemError + :members: .. doxygenfunction:: fmt::ThrowSystemError diff --git a/format.h b/format.h index abfa94e7..b2a6f856 100644 --- a/format.h +++ b/format.h @@ -521,7 +521,7 @@ class FormatError : public std::runtime_error { }; /** - An error returned by the operating system or the language runtime, + An error returned by an operating system or a language runtime, for example a file opening error. */ class SystemError : public std::runtime_error { @@ -1589,9 +1589,10 @@ class SystemErrorSink { /** \rst - Formats a message and throws SystemError with the description of the form - ": ", where ** is the formatted message - and ** is the system message corresponding to the error code. + Formats a message and throws :cpp:class:`fmt::SystemError` with + the description of the form "**: **", + where ** is the formatted message and ** + is the system message corresponding to the error code. *error_code* is a system error code as given by ``errno``. \endrst */ @@ -1623,9 +1624,10 @@ class WinErrorSink { /** \rst - Formats a message and throws SystemError with the description of the form - ": ", where ** is the formatted message - and ** is the system message corresponding to the error code. + Formats a message and throws :cpp:class:`fmt::SystemError` with + the description of the form "**: **", + where ** is the formatted message and ** + 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.