mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 21:47:40 -05:00
impr: Properly print asserts
This commit is contained in:
@@ -42,4 +42,14 @@ namespace hex::log::impl {
|
||||
return logEntries;
|
||||
}
|
||||
|
||||
void assertionHandler(bool expr, const char* expr_str, const char* file, int line) {
|
||||
if (!expr) {
|
||||
log::error("Assertion failed: {} at {}:{}", expr_str, file, line);
|
||||
|
||||
#if defined (DEBUG)
|
||||
std::abort();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user