DPL: udate dpl/core/include/dpl/assert.h from latest wrt-commons 61/23161/4
authorRafal Krypa <r.krypa@samsung.com>
Mon, 2 Jun 2014 16:52:43 +0000 (18:52 +0200)
committerRafal Krypa <r.krypa@samsung.com>
Mon, 23 Jun 2014 18:03:48 +0000 (20:03 +0200)
Needed to get AssertMsg macro, used in other DPL modules.

Change-Id: Iaca6c09a52e2f6644580d667a6817cfaa777d0a4
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
src/server/dpl/core/include/dpl/assert.h

index 34daa4d..9a6779c 100644 (file)
@@ -40,4 +40,13 @@ SECURITYMANAGER_NORETURN void AssertProc(const char *condition,
                                                                    __FUNCTION__); \
                                } } while (0)
 
+#define AssertMsg(Condition, Msg)                                         \
+    do {                                                                  \
+        if (!(Condition)) {                                               \
+            SecurityManager::AssertProc(                                              \
+                (std::string(std::string(#Condition)+" ") + Msg).c_str(), \
+                __FILE__, __LINE__, __FUNCTION__);                        \
+        }                                                                 \
+    } while (0)
+
 #endif // SECURITY_MANAGER_ASSERT_H