[+] SysUnreachable

This commit is contained in:
Reece Wilson 2023-04-21 22:09:01 +01:00
parent 6d73dde240
commit 4d9d6ae474

View File

@ -12,13 +12,16 @@ template<typename ... T>
static inline void AU_NORETURN SysPanic(T... args)
{
Aurora::Debug::AddMemoryCrunch();
try
{
Aurora::Logging::WriteLinef(static_cast<AuUInt8>(Aurora::Logging::ELogLevel::eError), Aurora::Console::EAnsiColor::eBoldRed, "Fatal", AuForward<T>(args)...);
}
catch (...)
if constexpr (sizeof...(T) != 0)
{
try
{
Aurora::Logging::WriteLinef(static_cast<AuUInt8>(Aurora::Logging::ELogLevel::eError), Aurora::Console::EAnsiColor::eBoldRed, "Fatal", AuForward<T>(args)...);
}
catch (...)
{
}
}
Aurora::Debug::Panic();
}
@ -38,4 +41,12 @@ static inline void AU_NORETURN SysPanic2(AuUInt uLineHintInNonshipBinary,
}
Aurora::Debug::Panic2(uLineHintInNonshipBinary);
}
static inline void SysUnreachable_(int uLineHintInNonshipBinary)
{
Aurora::Debug::Panic2(uLineHintInNonshipBinary);
}
#define SysUnreachable() SysUnreachable_(SysSafeLine)
#endif