add missing OCException case
authorGregg Reynolds <reynolds-gregg@norc.org>
Mon, 6 Jun 2016 06:00:26 +0000 (01:00 -0500)
committerAshok Babu Channa <ashok.channa@samsung.com>
Mon, 6 Jun 2016 13:56:39 +0000 (13:56 +0000)
Change-Id: Ia5d92080ab6adb31c4748366dd5392a70bf4cf0f
Signed-off-by: Gregg Reynolds <reynolds-gregg@norc.org>
Reviewed-on: https://gerrit.iotivity.org/gerrit/8481
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
resource/include/StringConstants.h
resource/src/OCException.cpp
resource/unittests/OCExceptionTest.cpp

index 4b97938..09c9486 100644 (file)
@@ -107,6 +107,7 @@ namespace OC
         static const char INVALID_ATTRIBUTE[]          = "Invalid Attribute: ";
         static const char INVALID_DEVICE_INFO[]        = "Invalid Device Information";
         static const char UNAUTHORIZED_REQUEST[]       = "Unauthorized Request";
+        static const char TOO_LARGE_REQ[]              = "Request Too Large";
         static const char PDM_DB_NOT_INITIALIZED[]     = "Provisioning DB is not initialized";
         static const char DUPLICATE_UUID[]             = "Duplicate UUID in DB";
         static const char INCONSISTENT_DB[]            = "Data in provisioning DB is inconsistent";
index cdbb0e7..e199f5d 100644 (file)
@@ -97,6 +97,8 @@ std::string OC::OCException::reason(const OCStackResult sr)
             return OC::Exception::INVALID_REPRESENTATION;
         case OC_STACK_UNAUTHORIZED_REQ:
             return OC::Exception::UNAUTHORIZED_REQUEST;
+        case OC_STACK_TOO_LARGE_REQ:
+            return OC::Exception::TOO_LARGE_REQ;
         case OC_STACK_PDM_IS_NOT_INITIALIZED:
             return OC::Exception::PDM_DB_NOT_INITIALIZED;
         case OC_STACK_DUPLICATE_UUID:
index efe51dd..d6b7ef1 100644 (file)
@@ -64,6 +64,7 @@ namespace OC
                 OC_STACK_INVALID_DEVICE_INFO,
                 OC_STACK_INVALID_JSON,
                 OC_STACK_UNAUTHORIZED_REQ,
+                OC_STACK_TOO_LARGE_REQ,
                 OC_STACK_PRESENCE_STOPPED,
                 OC_STACK_PRESENCE_TIMEOUT,
                 OC_STACK_PRESENCE_DO_NOT_HANDLE,
@@ -107,6 +108,7 @@ namespace OC
                 OC::Exception::INVALID_DEVICE_INFO,
                 OC::Exception::INVALID_REPRESENTATION,
                 OC::Exception::UNAUTHORIZED_REQUEST,
+                OC::Exception::TOO_LARGE_REQ,
                 OC::Exception::PRESENCE_STOPPED,
                 OC::Exception::PRESENCE_TIMEOUT,
                 OC::Exception::PRESENCE_NOT_HANDLED,