diff --git a/include/blt/std/assert.h b/include/blt/std/assert.h index b36cb8a..385f13f 100644 --- a/include/blt/std/assert.h +++ b/include/blt/std/assert.h @@ -16,6 +16,8 @@ namespace blt void b_assert_failed(const char* expression, const char* path, int line); void b_throw(const char* what, const char* path, int line); + + bool assert_print(const char* what); } // prints error with stack trace if assertion fails. Does not stop execution. diff --git a/src/blt/std/assert.cpp b/src/blt/std/assert.cpp index d41cf29..25fabbd 100644 --- a/src/blt/std/assert.cpp +++ b/src/blt/std/assert.cpp @@ -107,5 +107,11 @@ namespace blt { #endif } + bool assert_print(const char* what) + { + BLT_ERROR(what); + return true; + } + } \ No newline at end of file