Add bt_common_abort() and use it instead of abort() directly
[babeltrace.git] / src / lib / assert-post.h
index 2ed45a51f50151a872a548c8356ca9aa50ca2f1b..2cc359b4078445adaad91722641d039fb1c8c716 100644 (file)
 # error Include "lib/logging.h" before this header.
 #endif
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <inttypes.h>
 #include "common/macros.h"
+#include "common/common.h"
 
 /*
  * Prints the details of an unsatisfied postcondition without
@@ -87,7 +89,7 @@
  * the user), use BT_ASSERT_PRE().
  *
  * To assert that an internal postcondition is satisfied, use
- * BT_ASSERT().
+ * BT_ASSERT() or BT_ASSERT_DBG().
  */
 #define BT_ASSERT_POST(_cond, _fmt, ...)                               \
        do {                                                            \
@@ -95,7 +97,7 @@
                        BT_ASSERT_POST_MSG("Babeltrace 2 library postcondition not satisfied; error is:"); \
                        BT_ASSERT_POST_MSG(_fmt, ##__VA_ARGS__);        \
                        BT_ASSERT_POST_MSG("Aborting...");              \
-                       abort();                                        \
+                       bt_common_abort();                                      \
                }                                                       \
        } while (0)
 
This page took 0.024762 seconds and 4 git commands to generate.