From 48cc2444780a3df4708a3100038848d22464f9b6 Mon Sep 17 00:00:00 2001 From: "hyuna0213.jo" Date: Wed, 31 Aug 2016 13:39:01 +0900 Subject: [PATCH] Changed OcException message in JniOcPlatform If the function is not supported, we return Not supported message not fail. Change-Id: I43b96d6a7c1948a629dfc07a0b557e67987c8733 Signed-off-by: hyuna0213.jo Reviewed-on: https://gerrit.iotivity.org/gerrit/11175 Reviewed-by: Jaehong Jo Tested-by: jenkins-iotivity Reviewed-by: jihwan seo Reviewed-by: Dave Thaler Reviewed-by: Jon A. Cruz --- android/android_api/base/jni/JniOcPlatform.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/android/android_api/base/jni/JniOcPlatform.cpp b/android/android_api/base/jni/JniOcPlatform.cpp index b440bc0..da0aea3 100644 --- a/android/android_api/base/jni/JniOcPlatform.cpp +++ b/android/android_api/base/jni/JniOcPlatform.cpp @@ -2514,7 +2514,7 @@ JNIEXPORT jobject JNICALL Java_org_iotivity_base_OcPlatform_subscribeDevicePrese } return jPresenceHandle; #else - ThrowOcException(JNI_EXCEPTION, "Not support"); + ThrowOcException(JNI_NO_SUPPORT, "Not supported"); return nullptr; #endif } @@ -2687,7 +2687,7 @@ JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_publishResourceToRD0( ThrowOcException(e.code(), e.reason().c_str()); } #else - ThrowOcException(OC_STACK_ERROR, "Publish resource has failed"); + ThrowOcException(JNI_NO_SUPPORT, "Not supported"); return; #endif } @@ -2780,7 +2780,7 @@ JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_publishResourceToRD1( ThrowOcException(e.code(), e.reason().c_str()); } #else - ThrowOcException(OC_STACK_ERROR, "Publish resource has failed"); + ThrowOcException(JNI_NO_SUPPORT, "Not supported"); return; #endif } @@ -2837,7 +2837,7 @@ JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_deleteResourceFromRD0( ThrowOcException(e.code(), e.reason().c_str()); } #else - ThrowOcException(OC_STACK_ERROR, "Delete resource has failed"); + ThrowOcException(JNI_NO_SUPPORT, "Not supported"); return; #endif } @@ -2928,7 +2928,7 @@ JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_deleteResourceFromRD1( ThrowOcException(e.code(), e.reason().c_str()); } #else - ThrowOcException(OC_STACK_ERROR, "Delete resource has failed"); + ThrowOcException(JNI_NO_SUPPORT, "Not supported"); return; #endif } -- 2.7.4