From bd3be51abd8ff5dbc875380bdeadc4a01789b13e Mon Sep 17 00:00:00 2001 From: cat Date: Tue, 3 Feb 2026 13:19:59 +0200 Subject: [PATCH] Errors throw, while criticals terminate. --- source/Systems/Logging.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/Systems/Logging.cpp b/source/Systems/Logging.cpp index 9285c49..7b96132 100644 --- a/source/Systems/Logging.cpp +++ b/source/Systems/Logging.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -60,9 +61,12 @@ void Logging::Log(const std::string &message, const std::string &position, Logging::File.flush(); // Terrible but necessary sadly } - // Error and Critical - if (severity < Logging::LogLevel::Warning) { + if (severity == Logging::LogLevel::Error) { throw std::runtime_error(output); } + + if (severity == Logging::LogLevel::Critical) { + std::terminate(); + } } }