Corrected OCException that had gotten out of sync with OCStackResult.
authorJon A. Cruz <jonc@osg.samsung.com>
Tue, 10 Mar 2015 02:17:53 +0000 (19:17 -0700)
committerSashi Penta <sashi.kumar.penta@intel.com>
Tue, 10 Mar 2015 16:26:04 +0000 (16:26 +0000)
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 <jonc@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/459
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Joseph Morrow <joseph.l.morrow@intel.com>
Reviewed-by: Sashi Penta <sashi.kumar.penta@intel.com>
resource/include/StringConstants.h
resource/src/OCException.cpp

index 5782f04..03afaa1 100644 (file)
@@ -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 ";
index 76e54eb..7afd7ed 100644 (file)
@@ -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;