diff options
author | Max Kellermann <max@duempel.org> | 2013-10-30 23:41:02 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-30 23:41:02 +0100 |
commit | 8c010042193addcfd01f5b6cd230cabc87d41d22 (patch) | |
tree | efbda8621f267e03d9b46a4b1afb3a210c0436ce /src/system | |
parent | 8555b65c50d2bebc9becf4ec663241c439e8c02f (diff) | |
download | mpd-8c010042193addcfd01f5b6cd230cabc87d41d22.tar.gz mpd-8c010042193addcfd01f5b6cd230cabc87d41d22.tar.xz mpd-8c010042193addcfd01f5b6cd230cabc87d41d22.zip |
system/FatalError: move code to Abort()
Diffstat (limited to '')
-rw-r--r-- | src/system/FatalError.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/system/FatalError.cxx b/src/system/FatalError.cxx index c51dd7b3b..2752440f8 100644 --- a/src/system/FatalError.cxx +++ b/src/system/FatalError.cxx @@ -37,11 +37,18 @@ static constexpr Domain fatal_error_domain("fatal_error"); +gcc_noreturn +static void +Abort() +{ + exit(EXIT_FAILURE); +} + void FatalError(const char *msg) { LogError(fatal_error_domain, msg); - exit(EXIT_FAILURE); + Abort(); } void @@ -52,7 +59,7 @@ FormatFatalError(const char *fmt, ...) LogFormatV(fatal_error_domain, LogLevel::ERROR, fmt, ap); va_end(ap); - exit(EXIT_FAILURE); + Abort(); } void @@ -84,7 +91,7 @@ FatalSystemError(const char *msg) #endif FormatError(fatal_error_domain, "%s: %s", msg, system_error); - exit(EXIT_FAILURE); + Abort(); } void |