From c2193c41eb2001add35be0faedffad3d611ed53b Mon Sep 17 00:00:00 2001 From: Jcw87 Date: Fri, 15 Sep 2023 16:02:47 -0700 Subject: JKRHeap (#1927) * JKRHeap * d_a_link --- include/JSystem/JUtility/JUTAssert.h | 14 +++++++++----- include/JSystem/JUtility/JUTException.h | 3 +++ 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'include/JSystem/JUtility') diff --git a/include/JSystem/JUtility/JUTAssert.h b/include/JSystem/JUtility/JUTAssert.h index 61edbfbee3..219ef76eea 100644 --- a/include/JSystem/JUtility/JUTAssert.h +++ b/include/JSystem/JUtility/JUTAssert.h @@ -10,17 +10,21 @@ OSPanic(FILE, LINE, "Halt"); \ } -#else -#define JUT_ASSERT(...) -#endif - -#if DEBUG #define JUT_PANIC(FILE, LINE, TEXT) \ JUTAssertion::showAssert(JUTAssertion::getSDevice(), FILE, LINE, TEXT); \ OSPanic(FILE, LINE, "Halt"); +#define JUT_WARN(FILE, LINE, ...) \ + JUTAssertion::setWarningMessage_f(JUTAssertion::getSDevice(), FILE, LINE, __VA_ARGS__) + +#define JUT_LOG(LINE, ...) \ + JUTAssertion::setLogMessage_f(JUTAssertion::getSDevice(), __FILE__, LINE, __VA_ARGS__) + #else +#define JUT_ASSERT(...) #define JUT_PANIC(...) +#define JUT_WARN(...) +#define JUT_LOG(...) #endif namespace JUTAssertion { diff --git a/include/JSystem/JUtility/JUTException.h b/include/JSystem/JUtility/JUTException.h index 99da12c7c8..05a1661c41 100644 --- a/include/JSystem/JUtility/JUTException.h +++ b/include/JSystem/JUtility/JUTException.h @@ -103,6 +103,9 @@ public: static void setMapFile(const char* map) { appendMapFile(map); } + static void panic(const char* file, int line, const char* msg) { + panic_f(file, line, "%s", msg); + } private: static OSMessageQueue sMessageQueue; -- cgit v1.2.3