\r
#include "JniNotificationCommon.h"\r
#include <cstddef>\r
+#include "JniUtils.h"\r
\r
static jclass g_cls_NSException = NULL;\r
static jmethodID g_mid_NSException_ctor = NULL;\r
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
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
{\r
if (!env)\r
{\r
- LOGE ("JNIEnv is null");\r
+ NS_LOGE ("JNIEnv is null");\r
return JNI_ERR;\r
}\r
\r
"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
"<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
"(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