diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-03-10 12:39:04 +0500 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-03-10 12:48:59 +0500 |
commit | 4a13df61b92b8bf673f8a71d5fa0abf0356a4899 (patch) | |
tree | 071a3830ce0f2309e40a4bb16b7dd42018bd852f /include/winapi/error.hpp | |
parent | Makefile: remove stupid header, etc. (diff) | |
download | winapi-common-4a13df61b92b8bf673f8a71d5fa0abf0356a4899.tar.gz winapi-common-4a13df61b92b8bf673f8a71d5fa0abf0356a4899.zip |
add Doxygen docs
Diffstat (limited to 'include/winapi/error.hpp')
-rw-r--r-- | include/winapi/error.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/winapi/error.hpp b/include/winapi/error.hpp index 8ecd720..35e10f0 100644 --- a/include/winapi/error.hpp +++ b/include/winapi/error.hpp @@ -3,6 +3,11 @@ // For details, see https://github.com/egor-tensin/winapi-common. // Distributed under the MIT License. +/** + * @file + * @brief Make `std::system_error` work with `GetLastError()`. + */ + #pragma once #include <windows.h> @@ -30,6 +35,11 @@ inline const CategoryWindows& category_windows() { return instance; } +/** + * Build a `std::system_error` from the value of `GetLastError()`. + * @param code Value of `GetLastError()`. + * @param function Name of the function that failed, like "CreateFile". + */ std::system_error windows(DWORD code, const char* function); template <typename Ret> |