Add codes handling the CALENDAR_ERROR_NO_DATA exeption
authorhs321.lee <hs321.lee@samsung.com>
Thu, 25 Jul 2013 02:41:12 +0000 (11:41 +0900)
committerhs321.lee <hs321.lee@samsung.com>
Thu, 25 Jul 2013 02:44:00 +0000 (11:44 +0900)
Change-Id: I2e2ac879392684dd09b22bffe6adfc7beb143f68
Signed-off-by: hs321.lee <hs321.lee@samsung.com>
src/FScl_CalendarbookImpl.cpp

index 939c226..834e56f 100644 (file)
@@ -1640,7 +1640,7 @@ _CalendarbookImpl::ParseEventsFromVcalendarN(const String& vCalFilePath)
        errorCode = calendar_vcalendar_parse_to_calendar(reinterpret_cast<char*>(const_cast<byte*>(pBuffer->GetPointer())), &calendarListHandle);
        SysTryReturn(NID_SCL, errorCode != CALENDAR_ERROR_OUT_OF_MEMORY, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
        SysTryReturn(NID_SCL, errorCode != CALENDAR_ERROR_INVALID_PARAMETER, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used.  The vCal file is invalid.");
-       SysTryReturn(NID_SCL, errorCode == CALENDAR_ERROR_NONE, null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred.");
+       SysTryReturn(NID_SCL, errorCode == CALENDAR_ERROR_NONE || errorCode == CALENDAR_ERROR_NO_DATA, null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred.");
        _CalendarList calendarList(calendarListHandle);
 
        std::unique_ptr<ArrayList, AllElementsDeleter> pList(new (std::nothrow) ArrayList());
@@ -1737,7 +1737,7 @@ _CalendarbookImpl::ParseTodosFromVcalendarN(const String& vCalFilePath)
        errorCode = calendar_vcalendar_parse_to_calendar(reinterpret_cast<char*>(const_cast<byte*>(pBuffer->GetPointer())), &calendarListHandle);
        SysTryReturn(NID_SCL, errorCode != CALENDAR_ERROR_OUT_OF_MEMORY, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
        SysTryReturn(NID_SCL, errorCode != CALENDAR_ERROR_INVALID_PARAMETER, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used.  The vCal file is invalid.");
-       SysTryReturn(NID_SCL, errorCode == CALENDAR_ERROR_NONE, null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred.");
+       SysTryReturn(NID_SCL, errorCode == CALENDAR_ERROR_NONE || errorCode == CALENDAR_ERROR_NO_DATA, null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred.");
        _CalendarList calendarList(calendarListHandle);
 
        std::unique_ptr<ArrayList, AllElementsDeleter> pList(new (std::nothrow) ArrayList());