diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-09-16 01:47:56 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-09-16 01:47:56 +0300 |
commit | fbd6445c68745d484d5df8c75b0c12054185958f (patch) | |
tree | c8eb6da6b89d88f530647f408fd2c47669e1bb27 /error.hpp | |
parent | .hpp instead of .h for C++ headers (diff) | |
download | privilege-check-fbd6445c68745d484d5df8c75b0c12054185958f.tar.gz privilege-check-fbd6445c68745d484d5df8c75b0c12054185958f.zip |
move source files to src/
Diffstat (limited to 'error.hpp')
-rw-r--r-- | error.hpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/error.hpp b/error.hpp deleted file mode 100644 index 2ea7f85..0000000 --- a/error.hpp +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include <Windows.h> - -#include <system_error> - -typedef std::system_error Error; - -namespace error -{ - inline void raise(const char* function_name) - { - const auto ec = GetLastError(); - throw std::system_error(ec, std::system_category(), function_name); - } - - void report(const Error& e) - { - MessageBoxA(NULL, e.what(), NULL, MB_OK); - } - - int get_code(const Error& e) - { - return e.code().value(); - } -} |