From 806eaa229a73e8cbfa37a1b4c052df4f074996a3 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Mon, 8 Jul 2019 23:18:54 -0500 Subject: [PATCH] [ox/std] Add log message for asserts --- deps/ox/src/ox/std/assert.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deps/ox/src/ox/std/assert.cpp b/deps/ox/src/ox/std/assert.cpp index dae1c747..741d27f1 100644 --- a/deps/ox/src/ox/std/assert.cpp +++ b/deps/ox/src/ox/std/assert.cpp @@ -13,6 +13,8 @@ #include "defines.hpp" #include "stacktrace.hpp" +#include "trace.hpp" + #include "assert.hpp" namespace ox { @@ -23,6 +25,7 @@ void assertFunc([[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