[ox/std] Add log message for asserts

This commit is contained in:
Gary Talent 2019-07-08 23:18:54 -05:00
parent 7b034be393
commit 806eaa229a

View File

@ -13,6 +13,8 @@
#include "defines.hpp"
#include "stacktrace.hpp"
#include "trace.hpp"
#include "assert.hpp"
namespace ox {
@ -23,6 +25,7 @@ void assertFunc<bool>([[maybe_unused]]const char *file, [[maybe_unused]]int line
if (!pass) {
std::cerr << "\033[31;1;1mASSERT FAILURE:\033[0m (" << file << ':' << line << "): " << msg << std::endl;
printStackTrace(2);
oxTrace("assert").del("") << "Failed assert: " << msg << " (" << file << ":" << line << ")";
std::abort();
}
#endif