tizen 2.4 release
[framework/security/key-manager.git] / src / manager / dpl / core / src / exception.cpp
index 32d6024..792c97f 100644 (file)
@@ -22,6 +22,7 @@
 #include <stddef.h>
 #include <dpl/exception.h>
 #include <dpl/log/log.h>
+#include <cstdio>
 
 namespace CKM {
 Exception* Exception::m_lastException = NULL;
@@ -30,6 +31,9 @@ void (*Exception::m_terminateHandler)() = NULL;
 
 void LogUnhandledException(const std::string &str)
 {
+    // Logging to console
+    printf("%s\n", str.c_str());
+
     // Logging to dlog
     LogPedantic(str);
 }
@@ -39,6 +43,13 @@ void LogUnhandledException(const std::string &str,
                            int line,
                            const char *function)
 {
+    // Logging to console
+    std::ostringstream msg;
+    msg << "\033[1;5;31m\n=== [" << filename << ":" << line << "] " <<
+    function << " ===\033[m";
+    msg << str;
+    printf("%s\n", msg.str().c_str());
+
     // Logging to dlog
     CKM::Log::LogSystemSingleton::Instance().Log(CKM::Log::AbstractLogProvider::LogLevel::Error,
                                                  str.c_str(),