From 184e8eca7cd6ca33ffd60994ed7d7c96595ca214 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 13 Oct 2021 16:31:19 +0200 Subject: [PATCH] win32/Win32Main: throw on error --- src/win32/Win32Main.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/win32/Win32Main.cxx b/src/win32/Win32Main.cxx index 83c86fd30..4f0fd4165 100644 --- a/src/win32/Win32Main.cxx +++ b/src/win32/Win32Main.cxx @@ -20,7 +20,7 @@ #include "Main.hxx" #include "util/Compiler.h" #include "Instance.hxx" -#include "system/FatalError.hxx" +#include "system/Error.hxx" #include "Log.hxx" #include @@ -83,7 +83,7 @@ try { service_dispatcher, nullptr); if (service_handle == 0) - FatalSystemError("RegisterServiceCtrlHandlerEx() failed"); + throw MakeLastError("RegisterServiceCtrlHandlerEx() failed"); service_notify_status(SERVICE_START_PENDING); mpd_main(service_argc, service_argv); @@ -137,7 +137,7 @@ int win32_main(int argc, char *argv[]) return mpd_main(argc, argv); } - FatalSystemError("StartServiceCtrlDispatcher() failed", error_code); + throw MakeLastError(error_code, "StartServiceCtrlDispatcher() failed"); } void win32_app_started()