aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/utils/libservice/src/service_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/libservice/src/service_manager.cpp')
-rw-r--r--utils/libservice/src/service_manager.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/utils/libservice/src/service_manager.cpp b/utils/libservice/src/service_manager.cpp
index b3c0b96..d815089 100644
--- a/utils/libservice/src/service_manager.cpp
+++ b/utils/libservice/src/service_manager.cpp
@@ -6,10 +6,7 @@
* See LICENSE.txt for details.
*/
-#include "libservice/common.hpp"
-#include "libservice/service_handle.hpp"
-#include "libservice/service_manager.hpp"
-#include "libservice/windows_error.hpp"
+#include "libservice/all.hpp"
#include <Windows.h>
@@ -25,10 +22,11 @@ namespace libservice
if (NULL == raw)
{
const auto ec = GetLastError();
- throw std::system_error(ec, WinErrorCategory::get());
+ throw std::system_error(
+ ec, WindowsErrorCategory::get(), LIBSERVICE_ERROR_PREFIX);
}
- return ServiceManager(ServiceHandle(raw));
+ return ServiceHandle(raw);
}
void swap(ServiceManager& a, ServiceManager& b) LIBSERVICE_NOEXCEPT