model: restructure statistics records
[cdsspec-compiler.git] / common.cc
index 20102b0bba76ecee78f3491302b5768967c482a2..8b5c99717137d1d3f6a95b423fb6c8bf6fc2b08f 100644 (file)
--- a/common.cc
+++ b/common.cc
@@ -46,8 +46,9 @@ void assert_hook(void)
 void model_assert(bool expr, const char *file, int line)
 {
        if (!expr) {
-               printf("  [BUG] Program has hit assertion in file %s at line %d\n",
+               char msg[100];
+               sprintf(msg, "Program has hit assertion in file %s at line %d\n",
                                file, line);
-               model->set_assert();
+               model->assert_bug(msg, true);
        }
 }