From: Jon A. Cruz Date: Tue, 10 Mar 2015 02:17:53 +0000 (-0700) Subject: Corrected OCException that had gotten out of sync with OCStackResult. X-Git-Tag: Plugfest-1~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c363c69639709fa39f4ed9b65a0aa61246ef643;p=contrib%2Fiotivity.git Corrected OCException that had gotten out of sync with OCStackResult. Corrected the OCException class that had gotten out of sync with new value added to OCStackResult and was resulting in warnings and inproper messages. Change-Id: I2bbc3044d89aee00018593cadc7ddee56f7b8b61 Signed-off-by: Jon A. Cruz Reviewed-on: https://gerrit.iotivity.org/gerrit/459 Tested-by: jenkins-iotivity Reviewed-by: Joseph Morrow Reviewed-by: Sashi Penta --- diff --git a/resource/include/StringConstants.h b/resource/include/StringConstants.h index 5782f04..03afaa1 100644 --- a/resource/include/StringConstants.h +++ b/resource/include/StringConstants.h @@ -96,6 +96,7 @@ namespace OC static const char STACK_CONTINUE[] = "Stack continue"; static const char INVALID_REQUEST_HANDLE[] = "Invalid request handle"; static const char INVALID_DEVICE_INFO[] = "Invalid device info"; + static const char INVALID_JSON[] = "Invalid JSON"; static const char UNKNOWN_ERROR[] = "Unknown Error"; static const char INVALID_REPRESENTATION[] = "Invalid Payload JSON"; static const char INVALID_JSON_TYPE[] = "Unrecognized JSON Type "; diff --git a/resource/src/OCException.cpp b/resource/src/OCException.cpp index 76e54eb..7afd7ed 100644 --- a/resource/src/OCException.cpp +++ b/resource/src/OCException.cpp @@ -79,6 +79,8 @@ std::string OC::OCException::reason(const OCStackResult sr) return OC::Exception::INVALID_REQUEST_HANDLE; case OC_STACK_INVALID_DEVICE_INFO: return OC::Exception::INVALID_DEVICE_INFO; + case OC_STACK_INVALID_JSON: + return OC::Exception::INVALID_JSON; #ifdef WITH_PRESENCE case OC_STACK_PRESENCE_STOPPED: return OC::Exception::PRESENCE_STOPPED;