replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / service / notification / android / notification-service / src / main / jni / common / JniNotificationCommon.cpp
index 5f8bea9..3be2935 100755 (executable)
@@ -48,6 +48,8 @@ static const char *NSResultToChar(const int nsresult)
             return "JNI_NO_NATIVE_POINTER";\r
         case JNI_INVALID_VALUE:\r
             return "JNI_INVALID_VALUE";\r
+        case NATIVE_EXCEPTION:\r
+            return "NATIVE_EXCEPTION";\r
         default:\r
             return "";\r
     }\r
@@ -57,6 +59,7 @@ static const char *NSResultToChar(const int nsresult)
 jobject getNSException(JNIEnv *env, const char *file, const char *functionName,\r
                        const int line, const int code, const char *message)\r
 {\r
+    NS_LOGE ("Failed : %s" , message );\r
     const char *codeChar = NSResultToChar(code);\r
     if (codeChar[0] == '\0')\r
     {\r
@@ -93,7 +96,7 @@ int NSExceptionInit(JNIEnv *env)
 {\r
     if (!env)\r
     {\r
-        LOGE ("JNIEnv is null");\r
+        NS_LOGE ("JNIEnv is null");\r
         return JNI_ERR;\r
     }\r
 \r
@@ -102,7 +105,7 @@ int NSExceptionInit(JNIEnv *env)
                                   "org/iotivity/service/ns/common/NSException");\r
     if (!localNSException)\r
     {\r
-        LOGE ("Failed to get local NSException");\r
+        NS_LOGE ("Failed to get local NSException");\r
         return JNI_ERR;\r
     }\r
     g_cls_NSException = (jclass)env->NewGlobalRef(localNSException);\r
@@ -112,7 +115,7 @@ int NSExceptionInit(JNIEnv *env)
                              "<init>", "(Ljava/lang/String;Ljava/lang/String;)V");\r
     if (!g_mid_NSException_ctor)\r
     {\r
-        LOGE ("Failed to Get MethodID");\r
+        NS_LOGE ("Failed to Get MethodID");\r
         return JNI_ERR;\r
     }\r
 \r
@@ -121,7 +124,7 @@ int NSExceptionInit(JNIEnv *env)
             "(Ljava/lang/String;Ljava/lang/String;I)V");\r
     if (!g_mid_NSException_setNativeExceptionLocation)\r
     {\r
-        LOGE ("Failed to Get MethodID");\r
+        NS_LOGE ("Failed to Get MethodID");\r
         return JNI_ERR;\r
     }\r
 \r