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<byte[]> 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));
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()));