From 48fc0cdaed2d6fe1ecf98143249c30c785374005 Mon Sep 17 00:00:00 2001 From: Reece Date: Tue, 25 Apr 2023 12:23:22 +0100 Subject: [PATCH] [*] amend SysPanic2 to support 0 args --- Include/Aurora/Debug/SysPanic.hpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Include/Aurora/Debug/SysPanic.hpp b/Include/Aurora/Debug/SysPanic.hpp index 4e10515c..5a69dd7d 100644 --- a/Include/Aurora/Debug/SysPanic.hpp +++ b/Include/Aurora/Debug/SysPanic.hpp @@ -11,9 +11,9 @@ template static inline void AU_NORETURN SysPanic(T... args) { - Aurora::Debug::AddMemoryCrunch(); if constexpr (sizeof...(T) != 0) { + Aurora::Debug::AddMemoryCrunch(); try { Aurora::Logging::WriteLinef(static_cast(Aurora::Logging::ELogLevel::eError), Aurora::Console::EAnsiColor::eBoldRed, "Fatal", AuForward(args)...); @@ -30,14 +30,17 @@ template static inline void AU_NORETURN SysPanic2(AuUInt uLineHintInNonshipBinary, T... args) { - Aurora::Debug::AddMemoryCrunch(); - try - { - Aurora::Logging::WriteLinef(static_cast(Aurora::Logging::ELogLevel::eError), Aurora::Console::EAnsiColor::eBoldRed, "Fatal", AuForward(args)...); - } - catch (...) + if constexpr (sizeof...(T) != 0) { + Aurora::Debug::AddMemoryCrunch(); + try + { + Aurora::Logging::WriteLinef(static_cast(Aurora::Logging::ELogLevel::eError), Aurora::Console::EAnsiColor::eBoldRed, "Fatal", AuForward(args)...); + } + catch (...) + { + } } Aurora::Debug::Panic2(uLineHintInNonshipBinary); }