Index: compiled/debug.h |
=================================================================== |
--- a/compiled/debug.h |
+++ b/compiled/debug.h |
@@ -46,23 +46,27 @@ |
{ |
LogError(str); |
} |
}; |
static console_type console; |
#if defined(DEBUG) |
-inline void assert(bool condition, const String& str) |
+#define assert(condition) \ |
+ assert2(condition, u"Assertion failed: "#condition""_str) |
Wladimir Palant
2017/09/21 08:01:19
Please don't define the assert() macro. The whole
hub
2017/09/21 12:49:39
ok. done.
|
+ |
+inline void assert2(bool condition, const String& str) |
{ |
if (!condition) |
console.error(str); |
} |
#else |
-#define assert(condition, str) |
+#define assert(condition) |
+#define assert2(condition, str) |
#endif |
#if defined(__EMSCRIPTEN_TRACING__) |
#include <emscripten/trace.h> |
inline void init_tracing() |
{ |
emscripten_trace_configure("http://127.0.0.1:5000/", "MyApplication"); |