From a1319ce079efd613297010b4a3ce2fef238366de Mon Sep 17 00:00:00 2001 From: Seongjun Yim Date: Sat, 23 Mar 2013 19:32:43 +0900 Subject: [PATCH] modify exception Change-Id: Id4f75e96d5a58fbb75c0844d40d905a3dc596f6c Signed-off-by: Seongjun Yim --- src/FWebJson_JsonParserImpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 src/FWebJson_JsonParserImpl.cpp diff --git a/src/FWebJson_JsonParserImpl.cpp b/src/FWebJson_JsonParserImpl.cpp old mode 100644 new mode 100755 index 0b002f6..e28ccea --- a/src/FWebJson_JsonParserImpl.cpp +++ b/src/FWebJson_JsonParserImpl.cpp @@ -76,7 +76,7 @@ _JsonParserImpl::ParseN(const String& filePath) SysTryReturn(NID_WEB_JSON, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); long long size = attributes.GetFileSize(); - SysTryReturn(NID_WEB_JSON, size > 0, null, E_INVALID_DATA, "[E_INVALID_DATA] size of file is invalid [%ld].", size); + SysTryReturn(NID_WEB_JSON, size > 0, null, E_INVALID_DATA, "[E_INVALID_DATA] The size of file is invalid [%ld].", size); unique_ptr pBuffer(new (std::nothrow) byte[size]); SysTryReturn(NID_WEB_JSON, pBuffer.get(), null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); @@ -98,7 +98,7 @@ _JsonParserImpl::ParseN(const String& filePath) IJsonValue* _JsonParserImpl::ParseN(const void* pBuffer, int bufferLength) { - SysTryReturn(NID_WEB_JSON, pBuffer && bufferLength > 0, null, E_INVALID_DATA, "[E_INVALID_DATA] Invalid input data"); + SysTryReturn(NID_WEB_JSON, pBuffer && bufferLength > 0, null, E_INVALID_ARG, "[E_INVALID_ARG] The pBuffer is null or bufferLength is zero or negative."); unique_ptr<_JsonParserImpl> pParserImpl(_JsonParserImpl::CreateInstanceN()); SysTryReturn(NID_WEB_JSON, pParserImpl.get(), null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); -- 2.7.4