impr: Unionize exception and assertion handling

This commit is contained in:
WerWolv
2025-12-15 09:52:13 +01:00
parent 49bbe7dc77
commit cfac7ff0ba
10 changed files with 84 additions and 37 deletions

View File

@@ -12,6 +12,7 @@
#include <mutex>
#include <chrono>
#include <fmt/chrono.h>
#include <hex/helpers/debugging.hpp>
#if defined(OS_WINDOWS)
#include <Windows.h>
@@ -149,14 +150,6 @@ namespace hex::log {
);
}
void assertionHandler(const char* exprString, const char* file, int line) {
log::error("Assertion failed: {} at {}:{}", exprString, file, line);
#if defined (DEBUG)
std::abort();
#endif
}
namespace color {
fmt::color debug() { return fmt::color::medium_sea_green; }