From: Gregg Reynolds Date: Mon, 6 Jun 2016 06:00:26 +0000 (-0500) Subject: add missing OCException case X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=127bad8c8e5c7a4a82fec0078c77b407ee596cec;p=contrib%2Fiotivity.git add missing OCException case Change-Id: Ia5d92080ab6adb31c4748366dd5392a70bf4cf0f Signed-off-by: Gregg Reynolds Reviewed-on: https://gerrit.iotivity.org/gerrit/8481 Tested-by: jenkins-iotivity Reviewed-by: Ashok Babu Channa --- diff --git a/resource/include/StringConstants.h b/resource/include/StringConstants.h index 4b97938..09c9486 100644 --- a/resource/include/StringConstants.h +++ b/resource/include/StringConstants.h @@ -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"; diff --git a/resource/src/OCException.cpp b/resource/src/OCException.cpp index cdbb0e7..e199f5d 100644 --- a/resource/src/OCException.cpp +++ b/resource/src/OCException.cpp @@ -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: diff --git a/resource/unittests/OCExceptionTest.cpp b/resource/unittests/OCExceptionTest.cpp index efe51dd..d6b7ef1 100644 --- a/resource/unittests/OCExceptionTest.cpp +++ b/resource/unittests/OCExceptionTest.cpp @@ -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,