diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2017-05-01 16:21:37 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2017-05-01 16:21:37 +0300 |
commit | 669a246c175a002e368404fc0037379900bcca04 (patch) | |
tree | 2d50a6775f2ede118fdd6ab3f1ad05a726a891b4 /um/service/src/device.cpp | |
parent | um: strip the 'lib' prefix from namespace names (diff) | |
download | windows7-drivers-669a246c175a002e368404fc0037379900bcca04.tar.gz windows7-drivers-669a246c175a002e368404fc0037379900bcca04.zip |
service: refactoring
* No more compiler-specific macros.
Diffstat (limited to '')
-rw-r--r-- | um/service/src/device.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/um/service/src/device.cpp b/um/service/src/device.cpp index 003c19d..870930f 100644 --- a/um/service/src/device.cpp +++ b/um/service/src/device.cpp @@ -12,7 +12,6 @@ #include <limits> #include <stdexcept> #include <string> -#include <system_error> namespace service { @@ -32,8 +31,7 @@ namespace service if (INVALID_HANDLE_VALUE == raw) { const auto ec = GetLastError(); - throw std::system_error( - ec, WindowsErrorCategory::get(), LIBSERVICE_ERROR_PREFIX); + throw windows_error::make(ec, __FILE__, __LINE__, __FUNCTION__); } return Handle(raw); @@ -75,8 +73,7 @@ namespace service return nbreq; default: - throw std::system_error( - ec, WindowsErrorCategory::get(), LIBSERVICE_ERROR_PREFIX); + throw windows_error::make(ec, __FILE__, __LINE__, __FUNCTION__); } } @@ -110,8 +107,7 @@ namespace service if (0 == nbwritten) { const auto ec = GetLastError(); - throw std::system_error( - ec, WindowsErrorCategory::get(), LIBSERVICE_ERROR_PREFIX); + throw windows_error::make(ec, __FILE__, __LINE__, __FUNCTION__); } return nbwritten; |