diff options
author | sangwan.kwon <sangwan.kwon@samsung.com> | 2016-05-30 14:27:13 +0900 |
---|---|---|
committer | sangwan.kwon <sangwan.kwon@samsung.com> | 2016-05-30 14:35:25 +0900 |
commit | b8ffd7662428b4baff92a0c8271e84c2b55ce47b (patch) | |
tree | cdeecf4ba84a2fb7c852fa6c538a304f2a458196 /src/dpl/core/src/assert.cpp | |
parent | 30177b747ab42a7cedc5228803e057d05583b1a6 (diff) | |
download | cert-checker-b8ffd7662428b4baff92a0c8271e84c2b55ce47b.tar.gz cert-checker-b8ffd7662428b4baff92a0c8271e84c2b55ce47b.tar.bz2 cert-checker-b8ffd7662428b4baff92a0c8271e84c2b55ce47b.zip |
Apply tizen coding rule
* It depends on cpp rule checker(version 160520)
Change-Id: Ica308e1296be4f3567725fdb004f3bae8a456a0c
Diffstat (limited to 'src/dpl/core/src/assert.cpp')
-rw-r--r-- | src/dpl/core/src/assert.cpp | 64 |
1 files changed, 31 insertions, 33 deletions
diff --git a/src/dpl/core/src/assert.cpp b/src/dpl/core/src/assert.cpp index e367562..acaa958 100644 --- a/src/dpl/core/src/assert.cpp +++ b/src/dpl/core/src/assert.cpp @@ -28,41 +28,39 @@ namespace CCHECKER { void AssertProc(const char *condition, - const char *file, - int line, - const char *function) + const char *file, + int line, + const char *function) { #define INTERNAL_LOG(message) \ - do \ - { \ - std::ostringstream platformLog; \ - platformLog << message; \ - JournalLog(LOG_DEBUG, \ - platformLog.str().c_str(), \ - __FILE__, __LINE__, __FUNCTION__); \ - } \ - while (0) + do \ + { \ + std::ostringstream platformLog; \ + platformLog << message; \ + JournalLog(LOG_DEBUG, \ + platformLog.str().c_str(), \ + __FILE__, __LINE__, __FUNCTION__); \ + } \ + while (0) + // Try to log failed assertion to log system + Try { + INTERNAL_LOG( + "################################################################################"); + INTERNAL_LOG( + "### cert-checker assertion failed! ###"); + INTERNAL_LOG( + "################################################################################"); + INTERNAL_LOG("### Condition: " << condition); + INTERNAL_LOG("### File: " << file); + INTERNAL_LOG("### Line: " << line); + INTERNAL_LOG("### Function: " << function); + INTERNAL_LOG( + "################################################################################"); + } catch (Exception) { + // Just ignore possible double errors + } - // Try to log failed assertion to log system - Try - { - INTERNAL_LOG( - "################################################################################"); - INTERNAL_LOG( - "### cert-checker assertion failed! ###"); - INTERNAL_LOG( - "################################################################################"); - INTERNAL_LOG("### Condition: " << condition); - INTERNAL_LOG("### File: " << file); - INTERNAL_LOG("### Line: " << line); - INTERNAL_LOG("### Function: " << function); - INTERNAL_LOG( - "################################################################################"); - } catch (Exception) { - // Just ignore possible double errors - } - - // Fail with c-library abort - abort(); + // Fail with c-library abort + abort(); } } // namespace CCHECKER |