From 54ada88ddb5c2c7752d545a3c4e9b8d144ea0123 Mon Sep 17 00:00:00 2001 From: Cedric Roux <cedric.roux@eurecom.fr> Date: Wed, 11 Dec 2013 22:24:07 +0000 Subject: [PATCH] - Put "Exiting execution" key phrase in assertions to allow catching these errors in pre-ci git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4681 818b1a75-f10b-46b9-bf7c-635c3b92a50f --- common/utils/assertions.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/utils/assertions.h b/common/utils/assertions.h index bc81617a87..2ede7cfb83 100644 --- a/common/utils/assertions.h +++ b/common/utils/assertions.h @@ -41,6 +41,7 @@ do { \ __FILE__, __LINE__, __FUNCTION__); \ fprintf(stderr, #vALUE1": %"PRIdMAX"\n"#vALUE2": %"PRIdMAX"\n"#vALUE3": %"PRIdMAX"\n", \ (intmax_t)vALUE1, (intmax_t)vALUE2, (intmax_t)vALUE3); \ + fprintf(stderr, "Exiting execution\n"); \ abort(); \ } \ } while(0) @@ -53,6 +54,7 @@ do { \ fprintf(stderr, #vALUE1": %"PRIdMAX"\n"#vALUE2": %"PRIdMAX"\n"#vALUE3": %"PRIdMAX"\n" \ #vALUE4": %"PRIdMAX"\n", \ (intmax_t)vALUE1, (intmax_t)vALUE2, (intmax_t)vALUE3, (intmax_t)vALUE4); \ + fprintf(stderr, "Exiting execution\n"); \ exit(EXIT_FAILURE); \ } \ } while(0) @@ -63,8 +65,9 @@ do { \ #define DevAssert(cOND) \ do { \ if (!(cOND)) { \ - fprintf(stderr, "%s:%d:%s Assertion `"#cOND"` failed.\n", \ + fprintf(stderr, "%s:%d:%s Assertion `"#cOND"` failed\n", \ __FILE__, __LINE__, __FUNCTION__); \ + fprintf(stderr, "Exiting execution\n"); \ abort(); \ } \ } while(0) @@ -73,6 +76,7 @@ do { \ do { \ fprintf(stderr, "%s:%d:%s Execution interrupted: `"#mESSAGE"`.\n", \ __FILE__, __LINE__, __FUNCTION__); \ + fprintf(stderr, "Exiting execution\n"); \ abort(); \ } while(0) -- GitLab