diff --git a/Include/Aurora/Debug/SysAssertions.hpp b/Include/Aurora/Debug/SysAssertions.hpp index 6119c830..c53b4c68 100644 --- a/Include/Aurora/Debug/SysAssertions.hpp +++ b/Include/Aurora/Debug/SysAssertions.hpp @@ -30,7 +30,8 @@ #if !(defined(AU_CFG_ID_SHIP) || defined(AURORA_ASSERTIONS_FORCE_SHIP)) /// @private template - static auline void SysAssertFileEx(const char *file, int fileno, const char *func, bool tru, T... args) + static auline void SysAssertFileEx(const char *file, int fileno, const char *func, bool tru, + fmt::format_string msg, T&& ... args) { if (tru) { @@ -42,17 +43,26 @@ Aurora::Console::EAnsiColor::eBoldRed, "Fatal", "Expression address: {} {}:{}", func, file, fileno); - - if constexpr (sizeof...(T) == 0) - { - SysPanic2(fileno, "That's all folks"); - } - else - { - SysPanic2(fileno, args...); - } + + SysPanic2(fileno, msg, AuForward(args)...); } + template + static auline void SysAssertFileEx(const char *file, int fileno, const char *func, bool tru) + { + if (tru) + { + return; + } + + Aurora::Logging::WriteLinef( + static_cast(Aurora::Logging::ELogLevel::eError), + Aurora::Console::EAnsiColor::eBoldRed, + "Fatal", + "Expression address: {} {}:{}", func, file, fileno); + + SysPanic2(fileno, "That's all folks"); + } /** @@ -75,21 +85,14 @@ /// @private template - static auline void SysAssertEx(bool tru, int filenoOpt, T... args) + static auline void SysAssertEx(bool tru, int filenoOpt, fmt::format_string msg, T&& ... args) { if (tru) { return; } - if constexpr (sizeof...(T) == 0) - { - SysPanic2(filenoOpt, "That's all folks"); - } - else - { - SysPanic2(filenoOpt, args...); - } + SysPanic2(filenoOpt, msg, args...); } /** @@ -114,7 +117,7 @@ #if !(defined(AU_CFG_ID_SHIP) || defined(AURORA_ASSERTIONS_FORCE_SHIP)) /// @private template - static auline void SysAssertFileExpEx(const char *file, int fileno, const char *func, const char *exp, bool tru, T... args) + static auline void SysAssertFileExpEx(const char *file, int fileno, const char *func, const char *exp, bool tru, fmt::format_string msg, T&& ... args) { if (tru) { @@ -133,16 +136,32 @@ "Fatal", "Expression failed: {}", exp); - if constexpr (sizeof...(T) == 0) - { - SysPanic2(fileno, "That's all folks"); - } - else - { - SysPanic2(fileno, args...); - } + SysPanic2(fileno, msg, AuForward(args)...); } + /// @private + template + static auline void SysAssertFileExpEx(const char *file, int fileno, const char *func, const char *exp, bool tru) + { + if (tru) + { + return; + } + + Aurora::Logging::WriteLinef( + static_cast(Aurora::Logging::ELogLevel::eError), + Aurora::Console::EAnsiColor::eBoldRed, + "Fatal", + "Expression address: {} {}:{}", func, file, fileno); + + Aurora::Logging::WriteLinef( + static_cast(Aurora::Logging::ELogLevel::eError), + Aurora::Console::EAnsiColor::eBoldRed, + "Fatal", + "Expression failed: {}", exp); + + SysPanic2(fileno, "That's all folks"); + } /** @@ -165,7 +184,7 @@ #else /// @private template - static auline void SysAssertExpEx(const char *exp, int filenoOpt, bool tru, T... args) + static auline void SysAssertExpEx(const char *exp, int filenoOpt, bool tru, fmt::format_string msg, T&& ... args) { if (tru) { @@ -180,14 +199,7 @@ "Expression failed: {}", exp); #endif - if constexpr (sizeof...(T) == 0) - { - SysPanic2(filenoOpt, "That's all folks"); - } - else - { - SysPanic2(filenoOpt, args...); - } + SysPanic2(filenoOpt, msg, args...); } diff --git a/Include/Aurora/Debug/SysErrors.hpp b/Include/Aurora/Debug/SysErrors.hpp index 4e872294..d3c8bd89 100644 --- a/Include/Aurora/Debug/SysErrors.hpp +++ b/Include/Aurora/Debug/SysErrors.hpp @@ -45,27 +45,27 @@ namespace Aurora::Debug _PushError(GetIPNoBackend(), EFailureCategory::kFailureNested, nullptr); } - template - AU_INLINE void ErrorMakeNested(const AuString &msg, T&& ... args) + template + AU_INLINE void ErrorMakeNested(fmt::format_string msg, Args&& ... args) { - if constexpr (sizeof...(T) == 0) + if constexpr (sizeof...(Args) == 0) { - _PushError(GetIPNoBackend(), EFailureCategory::kFailureNested, msg.c_str()); + _PushError(GetIPNoBackend(), EFailureCategory::kFailureNested, msg.get().data()); } else { #if defined(_AUHAS_FMT) AUROXTL_COMMODITY_TRY { - auto tempString = fmt::format(msg, AuForward(args)...); + auto tempString = fmt::format(msg, AuForward(args)...); _PushError(GetIPNoBackend(), EFailureCategory::kFailureNested, tempString.c_str()); } AUROXTL_COMMODITY_CATCH { - _PushError(GetIPNoBackend(), EFailureCategory::kFailureNested, msg.c_str()); + _PushError(GetIPNoBackend(), EFailureCategory::kFailureNested, msg.get().data()); } #else - _PushError(GetIPNoBackend(), EFailureCategory::kFailureNested, msg.c_str()); + _PushError(GetIPNoBackend(), EFailureCategory::kFailureNested, msg.get().data()); #endif } } @@ -75,37 +75,47 @@ namespace Aurora::Debug _PushError(GetIPNoBackend(), EFailureCategory::kFailureNested, msg); } - template - AU_INLINE void SysPushError(EFailureCategory category, const AuString &msg, T&& ... args) + template + AU_INLINE void SysPushError(EFailureCategory category, fmt::format_string msg, Args&& ... args) { - if constexpr (sizeof...(T) == 0) + if constexpr (sizeof...(Args) == 0) { - _PushError(GetIPNoBackend(), category, msg.c_str()); + _PushError(GetIPNoBackend(), category, msg.get().data()); } else { #if defined(_AUHAS_FMT) AUROXTL_COMMODITY_TRY { - auto tempString = fmt::format(msg, AuForward(args)...); + auto tempString = fmt::format(msg.get().data(), AuForward(args)...); _PushError(GetIPNoBackend(), category, tempString.c_str()); } AUROXTL_COMMODITY_CATCH { - _PushError(GetIPNoBackend(), category, msg.c_str()); + _PushError(GetIPNoBackend(), category, msg.get().data()); } #else - _PushError(GetIPNoBackend(), category, msg.c_str()); + _PushError(GetIPNoBackend(), category, msg.get().data()); #endif } } - template - AU_INLINE void SysPushError(EFailureCategory category, AuUInt16 uLineHint, const AuString &msg, T&& ... args) + AU_INLINE void SysPushError(EFailureCategory category, const AuString &str) { - if constexpr (sizeof...(T) == 0) + _PushError(GetIPNoBackend(), category, str.c_str()); + } + + AU_INLINE void SysPushError(EFailureCategory category, AuUInt16 uLineHint, const AuString &str) + { + _PushError(GetIPNoBackend(), category, str.c_str(), uLineHint); + } + + template + AU_INLINE void SysPushError(EFailureCategory category, AuUInt16 uLineHint, fmt::format_string msg, Args&& ... args) + { + if constexpr (sizeof...(Args) == 0) { - _PushError(GetIPNoBackend(), category, msg.c_str()); + _PushError(GetIPNoBackend(), category, msg.get().data()); } else { @@ -113,15 +123,15 @@ namespace Aurora::Debug #if defined(_AUHAS_FMT) AUROXTL_COMMODITY_TRY { - auto tempString = fmt::format(msg, AuForward(args)...); + auto tempString = fmt::format(msg, AuForward(args)...); _PushError(GetIPNoBackend(), category, tempString.c_str(), uLineHint); } AUROXTL_COMMODITY_CATCH { - _PushError(GetIPNoBackend(), category, msg.c_str(), uLineHint); + _PushError(GetIPNoBackend(), category, msg.get().data(), uLineHint); } #else - _PushError(GetIPNoBackend(), category, msg.c_str(), uLineHint); + _PushError(GetIPNoBackend(), category, msg.get().data(), uLineHint); #endif Aurora::Debug::DecMemoryCrunch(); } diff --git a/Include/Aurora/Debug/SysPanic.hpp b/Include/Aurora/Debug/SysPanic.hpp index 68c3ea19..d403173c 100644 --- a/Include/Aurora/Debug/SysPanic.hpp +++ b/Include/Aurora/Debug/SysPanic.hpp @@ -14,21 +14,18 @@ namespace Aurora #if defined(_AUHAS_FMT) template -static inline void AU_NORETURN SysPanic(T... args) +static inline void AU_NORETURN SysPanic(fmt::format_string msg, T&& ... args) { if (Aurora::RuntimeHasStarted()) { - if constexpr (sizeof...(T) != 0) + Aurora::Debug::AddMemoryCrunch(); + try + { + Aurora::Logging::WriteLinef(static_cast(Aurora::Logging::ELogLevel::eError), Aurora::Console::EAnsiColor::eBoldRed, "Fatal", msg, AuForward(args)...); + } + catch (...) { - Aurora::Debug::AddMemoryCrunch(); - try - { - Aurora::Logging::WriteLinef(static_cast(Aurora::Logging::ELogLevel::eError), Aurora::Console::EAnsiColor::eBoldRed, "Fatal", AuForward(args)...); - } - catch (...) - { - } } } Aurora::Debug::Panic(); @@ -36,26 +33,64 @@ static inline void AU_NORETURN SysPanic(T... args) template static inline void AU_NORETURN SysPanic2(AuUInt uLineHintInNonshipBinary, - T... args) + fmt::format_string msg, T&& ... args) { if (Aurora::RuntimeHasStarted()) { - if constexpr (sizeof...(T) != 0) + Aurora::Debug::AddMemoryCrunch(); + try + { + Aurora::Logging::WriteLinef(static_cast(Aurora::Logging::ELogLevel::eError), Aurora::Console::EAnsiColor::eBoldRed, "Fatal", msg, AuForward(args)...); + } + catch (...) { - 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); } +template +static inline void AU_NORETURN SysPanic() +{ + if (Aurora::RuntimeHasStarted()) + { + Aurora::Debug::AddMemoryCrunch(); + try + { + Aurora::Logging::WriteLinef(static_cast(Aurora::Logging::ELogLevel::eError), Aurora::Console::EAnsiColor::eBoldRed, "Fatal"); + } + catch (...) + { + + } + } + Aurora::Debug::Panic(); +} + +template +static inline void AU_NORETURN SysPanic2(AuUInt uLineHintInNonshipBinary) +{ + if (Aurora::RuntimeHasStarted()) + { + Aurora::Debug::AddMemoryCrunch(); + try + { + Aurora::Logging::WriteLinef(static_cast(Aurora::Logging::ELogLevel::eError), Aurora::Console::EAnsiColor::eBoldRed, "Fatal"); + } + catch (...) + { + + } + } + Aurora::Debug::Panic2(uLineHintInNonshipBinary); +} + +static inline AU_NORETURN void SysPanic(const char *pMsg) +{ + SysPanic("{}", pMsg); +} + static inline AU_NORETURN void SysUnreachable_(int uLineHintInNonshipBinary) { Aurora::Debug::Panic2(uLineHintInNonshipBinary); diff --git a/Include/Aurora/Logging/Logging.hpp b/Include/Aurora/Logging/Logging.hpp index e1dc7b0a..3bade1fc 100644 --- a/Include/Aurora/Logging/Logging.hpp +++ b/Include/Aurora/Logging/Logging.hpp @@ -34,8 +34,8 @@ namespace Aurora::Logging #if defined(_AUHAS_FMT) - template - inline void WriteLinef(AuUInt8 level, const AuString &tag, const Line_t &msg, T&& ... args) + template + inline void WriteLinef(AuUInt8 level, const AuString &tag, fmt::format_string msg, T&& ... args) { AU_DEBUG_MEMCRUNCH; @@ -49,8 +49,8 @@ namespace Aurora::Logging } } - template - inline void WriteLinef(AuUInt8 level, EAnsiColor color, const AuString &tag, const Line_t &msg, T&& ... args) + template + inline void WriteLinef(AuUInt8 level, EAnsiColor color, const AuString &tag, fmt::format_string msg, T&& ... args) { AU_DEBUG_MEMCRUNCH; @@ -64,21 +64,21 @@ namespace Aurora::Logging } } - template - inline void LogVerbose(const Line_t &line, T&& ... args) + template + inline void LogVerbose(fmt::format_string line, T&& ... args) { WriteLinef(static_cast(ELogLevel::eVerbose), EAnsiColor::eYellow, "Verbose", line, AuForward(args)...); } #if defined(STAGING) || defined(DEBUG) - template - inline auline void LogVerboseNoShip(const Line_t &line, T&& ... args) + template + inline auline void LogVerboseNoShip(fmt::format_string line, T&& ... args) { WriteLinef(static_cast(ELogLevel::eVerbose), EAnsiColor::eYellow, "Verbose", line, AuForward(args)...); } #else - template - inline auline void LogVerboseNoShip(const Line_t &line, T&& ... args) + template + inline auline void LogVerboseNoShip(fmt::format_string line, T&& ... args) {} #endif @@ -87,38 +87,38 @@ namespace Aurora::Logging } - template - inline void LogInfo(const Line_t &line, T&& ... args) + template + inline void LogInfo(fmt::format_string line, T&& ... args) { WriteLinef(static_cast(ELogLevel::eInfo), EAnsiColor::eGreen, "Info", line, AuForward(args)...); } - template - inline void LogDbg(const Line_t &line, T&& ... args) + template + inline void LogDbg(fmt::format_string line, T&& ... args) { WriteLinef(static_cast(ELogLevel::eDebug), EAnsiColor::eYellow, "Debug", line, AuForward(args)...); } - template - inline void LogWarn(const Line_t &line, T&& ... args) + template + inline void LogWarn(fmt::format_string line, T&& ... args) { WriteLinef(static_cast(ELogLevel::eWarn), EAnsiColor::eRed, "Warn", line, AuForward(args)...); } - template - inline void LogError(const Line_t &line, T&& ... args) + template + inline void LogError(fmt::format_string line, T&& ... args) { WriteLinef(static_cast(ELogLevel::eError), EAnsiColor::eBoldRed, "Error", line, AuForward(args)...); } - template - inline void LogCritical(const Line_t &line, T&& ... args) + template + inline void LogCritical(fmt::format_string line, T&& ... args) { WriteLinef(static_cast(ELogLevel::eCritical), EAnsiColor::eBoldRed, "Critical", line, AuForward(args)...); } - template - inline void LogGame(const Line_t &line, T&& ... args) + template + inline void LogGame(fmt::format_string line, T&& ... args) { WriteLinef(static_cast(ELogLevel::eVerbose), EAnsiColor::eBlue, "Game", line, AuForward(args)...); } @@ -167,8 +167,8 @@ namespace Aurora::Logging WriteLine(static_cast(ELogLevel::eError), ConsoleMessage(EAnsiColor::eBoldRed, "Error", line)); } - template - inline void LogCritical(const Line_t &line, T&& ... args) + template + inline void LogCritical(fmt::format_string line, T&& ... args) { WriteLine(static_cast(ELogLevel::eCritical), ConsoleMessage(EAnsiColor::eBoldRed, "Critical", line)); } @@ -184,9 +184,9 @@ namespace Aurora::Logging #define ADD_AU_GLOBAL_ALIAS(level)\ template \ - static void AuLog ## level(T&& ... args) \ + static void AuLog ## level(fmt::format_string line, T&& ... args) \ { \ - Aurora::Logging::Log ## level(AuForward(args)...); \ + Aurora::Logging::Log ## level(line, AuForward(args)...); \ } ADD_AU_GLOBAL_ALIAS(Info) diff --git a/Source/Console/ConsoleTTY/ConsoleTTY.cpp b/Source/Console/ConsoleTTY/ConsoleTTY.cpp index 41f85836..1ab31a1d 100644 --- a/Source/Console/ConsoleTTY/ConsoleTTY.cpp +++ b/Source/Console/ConsoleTTY/ConsoleTTY.cpp @@ -910,7 +910,7 @@ namespace Aurora::Console::ConsoleTTY auto file = AuIOFS::OpenUnique(this->historyFileName, AuIOFS::EFileOpenMode::eReadWrite); if (!file) { - SysPushErrorIO(this->historyFileName); + SysPushErrorIO("{}", this->historyFileName); return; } diff --git a/Source/Crypto/ECC/ECCGeneric.hpp b/Source/Crypto/ECC/ECCGeneric.hpp index 3b1dc0e7..e9f01efb 100644 --- a/Source/Crypto/ECC/ECCGeneric.hpp +++ b/Source/Crypto/ECC/ECCGeneric.hpp @@ -62,7 +62,7 @@ namespace Aurora::Crypto::ECC if (oidLength != in.dp.oidlen || AuMemcmp(in.dp.oid, oid, in.dp.oidlen * sizeof(unsigned long))) { - SysPushErrorParam("Improper curve type, expected {}, got {}, for ECCCurveType: {}", ref.value()->OID, AuList(in.dp.oid, in.dp.oid + in.dp.oidlen), curve); + SysPushErrorParam("Improper curve type, expected {}, got {}, for ECCCurveType: {}", ref.value()->OID, AuList(in.dp.oid, in.dp.oid + in.dp.oidlen), (AuUInt)curve); ecc_free(&in); return nullptr; } diff --git a/Source/Crypto/ECC/ECCX25519Private.cpp b/Source/Crypto/ECC/ECCX25519Private.cpp index b4e79c36..2678cded 100644 --- a/Source/Crypto/ECC/ECCX25519Private.cpp +++ b/Source/Crypto/ECC/ECCX25519Private.cpp @@ -42,7 +42,7 @@ namespace Aurora::Crypto::ECC int hash = ::Crypto::HashMethodToId(method); if (hash == 0xFF) { - SysPushErrorCrypt("invalid hash {}", method); + SysPushErrorCrypt("invalid hash {}", AuUInt(method)); return false; } diff --git a/Source/Crypto/ECC/ECCX25519Public.cpp b/Source/Crypto/ECC/ECCX25519Public.cpp index 0d76a410..38619447 100644 --- a/Source/Crypto/ECC/ECCX25519Public.cpp +++ b/Source/Crypto/ECC/ECCX25519Public.cpp @@ -78,7 +78,7 @@ namespace Aurora::Crypto::ECC int hash = ::Crypto::HashMethodToId(method); if (hash == 0xFF) { - SysPushErrorCrypt("invalid hash {}", method); + SysPushErrorCrypt("invalid hash {}", AuUInt(method)); return false; } diff --git a/Source/Crypto/ECC/PrivateECCImpl.cpp b/Source/Crypto/ECC/PrivateECCImpl.cpp index 49cf7030..0187f89a 100644 --- a/Source/Crypto/ECC/PrivateECCImpl.cpp +++ b/Source/Crypto/ECC/PrivateECCImpl.cpp @@ -47,7 +47,7 @@ namespace Aurora::Crypto::ECC int hash = ::Crypto::HashMethodToId(method); if (hash == 0xFF) { - SysPushErrorCrypt("invalid hash {}", method); + SysPushErrorCrypt("invalid hash {}", AuUInt(method)); return false; } diff --git a/Source/Crypto/ECC/PublicECCImpl.cpp b/Source/Crypto/ECC/PublicECCImpl.cpp index c7d7baf0..757d97fb 100644 --- a/Source/Crypto/ECC/PublicECCImpl.cpp +++ b/Source/Crypto/ECC/PublicECCImpl.cpp @@ -79,7 +79,7 @@ namespace Aurora::Crypto::ECC int hash = ::Crypto::HashMethodToId(method); if (hash == 0xFF) { - SysPushErrorCrypt("invalid hash {}", method); + SysPushErrorCrypt("invalid hash {}", AuUInt(method)); return false; } diff --git a/Source/Crypto/HMAC/HMAC.cpp b/Source/Crypto/HMAC/HMAC.cpp index 620b0453..5346eddf 100644 --- a/Source/Crypto/HMAC/HMAC.cpp +++ b/Source/Crypto/HMAC/HMAC.cpp @@ -48,7 +48,7 @@ namespace Aurora::Crypto::HMAC int hash = ::Crypto::HashMethodToId(this->type_); if (hash == 0xFF) { - SysPushErrorCrypt("invalid hash {}", this->type_); + SysPushErrorCrypt("invalid hash {}", AuUInt(this->type_)); return false; } diff --git a/Source/Crypto/RSA/RSAPrivate.cpp b/Source/Crypto/RSA/RSAPrivate.cpp index 79b7e74f..d47f6744 100644 --- a/Source/Crypto/RSA/RSAPrivate.cpp +++ b/Source/Crypto/RSA/RSAPrivate.cpp @@ -40,14 +40,14 @@ namespace Aurora::Crypto::RSA int padding = ::Crypto::PaddingToType(type); if (padding == 0xFF) { - SysPushErrorCrypt("invalid pad {}", type); + SysPushErrorCrypt("invalid pad {}", (AuUInt)type); return false; } int hash = ::Crypto::HashMethodToId(method); if (hash == 0xFF) { - SysPushErrorCrypt("invalid hash {}", method); + SysPushErrorCrypt("invalid hash {}", (AuUInt)method); return false; } @@ -115,7 +115,7 @@ namespace Aurora::Crypto::RSA int padding = ::Crypto::PaddingToType(type); if (padding == 0xFF) { - SysPushErrorCrypt("invalid pad {}", type); + SysPushErrorCrypt("invalid pad {}", (AuUInt)type); return false; } diff --git a/Source/Crypto/RSA/RSAPublic.cpp b/Source/Crypto/RSA/RSAPublic.cpp index 81fc3084..ae12fa58 100644 --- a/Source/Crypto/RSA/RSAPublic.cpp +++ b/Source/Crypto/RSA/RSAPublic.cpp @@ -43,14 +43,14 @@ namespace Aurora::Crypto::RSA int padding = ::Crypto::PaddingToType(type); if (padding == 0xFF) { - SysPushErrorCrypt("invalid pad {}", type); + SysPushErrorCrypt("invalid pad {}", AuUInt(type)); return false; } int hash = ::Crypto::HashMethodToId(method); if (hash == 0xFF) { - SysPushErrorCrypt("invalid hash {}", method); + SysPushErrorCrypt("invalid hash {}", AuUInt(method)); return false; } @@ -101,7 +101,7 @@ namespace Aurora::Crypto::RSA int padding = ::Crypto::PaddingToType(type); if (padding == 0xFF) { - SysPushErrorCrypt("invalid pad {}", type); + SysPushErrorCrypt("invalid pad {}", (AuUInt)type); return false; } diff --git a/Source/Debug/ExceptionWatcher.NT.cpp b/Source/Debug/ExceptionWatcher.NT.cpp index 45f53da3..e2bfe0fb 100644 --- a/Source/Debug/ExceptionWatcher.NT.cpp +++ b/Source/Debug/ExceptionWatcher.NT.cpp @@ -314,7 +314,7 @@ extern "C" AUKN_SYM void __stdcall _ReportMSVCSEH(void *exception, const void *t AuDebug::ReportSEH(handle, exception, throwInfo, {}, trace, [&](const AuString &str) { - AuLogWarn("Local MSVC Exception: 0x{:x}, {}", exception, str.c_str()); + AuLogWarn("Local MSVC Exception: 0x{:x}, {}", AuUInt(exception), str.c_str()); AuLogWarn("{}", StringifyStackTrace(trace)); }); } diff --git a/Source/IO/AuIOPipeProcessor.cpp b/Source/IO/AuIOPipeProcessor.cpp index a38fbc98..447a1aed 100644 --- a/Source/IO/AuIOPipeProcessor.cpp +++ b/Source/IO/AuIOPipeProcessor.cpp @@ -224,7 +224,7 @@ namespace Aurora::IO auto err = this->pAsyncStreamReader_->Dequeue(0, internalBuffer); if (err != EStreamError::eErrorNone) { - SysPushErrorIO("Async Stream Error: {}", err); + SysPushErrorIO("Async Stream Error: {}", (AuUInt)err); TerminateOnThread(true); return; } @@ -239,7 +239,7 @@ namespace Aurora::IO err = this->pAsyncStreamReader_->Dequeue(internalBuffer.length, internalBuffer); if (err != EStreamError::eErrorNone) { - SysPushErrorIO("Async Stream Error: {}", err); + SysPushErrorIO("Async Stream Error: {}", (AuUInt)err); TerminateOnThread(true); return; } diff --git a/Source/Parse/AuParser.cpp b/Source/Parse/AuParser.cpp index 2599e669..281dc724 100644 --- a/Source/Parse/AuParser.cpp +++ b/Source/Parse/AuParser.cpp @@ -432,7 +432,7 @@ namespace Aurora::Parse break; } default: - SysPanic("Invalid consume tag {}", type); + SysPanic("Invalid consume tag {}", AuUInt(type)); } return true; @@ -529,7 +529,7 @@ namespace Aurora::Parse if (!ConsumeToken(state, ParsableTag::kParseUInt, arrayLengthBit)) { - SysPushErrorSyntaxError("Couldn't consume array length, label: {}, tag {}", parseBit.label, parseBit.tag); + SysPushErrorSyntaxError("Couldn't consume array length, label: {}, tag {}", parseBit.label, (AuUInt)parseBit.tag); return false; } @@ -567,7 +567,7 @@ namespace Aurora::Parse break; } default: - SysPanic("Invalid consume tag {} for {}", parseBit.tag, parseBit.label); + SysPanic("Invalid consume tag {} for {}", (AuUInt)parseBit.tag, parseBit.label); } if (!ok) @@ -577,7 +577,7 @@ namespace Aurora::Parse break; } - SysPushErrorSyntaxError("Syntax error around: label: {}, tag {}", parseBit.label, parseBit.tag); + SysPushErrorSyntaxError("Syntax error around: label: {}, tag {}", parseBit.label, (AuUInt)parseBit.tag); return false; } @@ -678,7 +678,7 @@ namespace Aurora::Parse break; } default: - SysPanic("Invalid consume tag {}", type); + SysPanic("Invalid consume tag {}", (AuUInt)type); } } @@ -728,7 +728,7 @@ namespace Aurora::Parse break; } default: - SysPanic("Invalid emit tag {}", parsed.tag); + SysPanic("Invalid emit tag {}", (AuUInt)parsed.tag); } } } diff --git a/Source/Registry/Registry.cpp b/Source/Registry/Registry.cpp index 417b4dbc..6f2f7aff 100644 --- a/Source/Registry/Registry.cpp +++ b/Source/Registry/Registry.cpp @@ -373,7 +373,7 @@ namespace Aurora::Registry if (!AuIOFS::WriteString(lastPath_.value().filePath, currentStreamDocument_.dump(4))) { - SysPushErrorIO("Couldn't write registry to {}", lastPath_.value()); + SysPushErrorIO("Couldn't write registry to {}", lastPath_.value().filePath); return false; }