Add a debugging log to exception class 08/202008/1
authorjusung son <jusung07.son@samsung.com>
Thu, 21 Mar 2019 23:56:52 +0000 (08:56 +0900)
committerjusung son <jusung07.son@samsung.com>
Thu, 21 Mar 2019 23:56:52 +0000 (08:56 +0900)
Change-Id: I49243fe874f07ba284589f156b756c3a0492f709
Signed-off-by: jusung son <jusung07.son@samsung.com>
notification-ex/exception.h

index 9e87cb74f98f9c180399f8b384f6d779fbcd7dc4..4da7af01cfe8f17d85b9520d8b4a62ef7fb10afa 100644 (file)
 #ifndef NOTIFICATION_EX_EXCEPTION_H_
 #define NOTIFICATION_EX_EXCEPTION_H_
 
+#include <dlog.h>
+
 #include <string>
 #include <exception>
 
 #include "notification-ex/common.h"
 
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+
+#define LOG_TAG "NOTIFICATION_EX"
+
 #define THROW(error_code) throw Exception(error_code, __FILE__, __LINE__)
 
 namespace notification {
@@ -33,6 +41,7 @@ class Exception : public std::exception {
     error_code_ = error_code;
     message_ = file.substr(file.find_last_of("/") + 1) + ":"
         + std::to_string(line) + GetErrorString(error_code);
+    LOGE("%s", message_.c_str());
   }
   virtual ~Exception() {}
   virtual const char *what(void) const noexcept {