Fixed exception handling codes
authorHosang Kim <hosang.kim@samsung.com>
Tue, 19 Mar 2013 07:48:27 +0000 (16:48 +0900)
committerHosang Kim <hosang.kim@samsung.com>
Tue, 19 Mar 2013 07:48:27 +0000 (16:48 +0900)
Change-Id: I1a11975a0cf047508f0c38905b956481cf1d5515
Signed-off-by: Hosang Kim <hosang.kim@samsung.com>
packaging/osp-social.spec
src/FScl_CalendarbookImpl.cpp

index 4056d33..ed8bca7 100755 (executable)
@@ -4,7 +4,7 @@
 Name:          osp-social
 Summary:       osp social library
 Version:       1.2.1.7
-Release:        4
+Release:        5
 Group:         System/Libraries
 License:       Apache License, Version 2.0
 Source0:       %{name}-%{version}.tar.gz
index b101452..e8fe678 100644 (file)
@@ -336,6 +336,7 @@ _CalendarbookImpl::AddEvent(CalEvent& event)
 
        errorCode = calendar_record_set_int(eventHandle, _calendar_event.calendar_book_id, _DEFAULT_EVENT_CALENDAR_DB_ID);
        errorCode = calendar_db_insert_record(eventHandle, &dbIndex);
+       SysTryReturnResult(NID_SCL, errorCode != CALENDAR_ERROR_FILE_NO_SPACE, E_STORAGE_FULL, "The storage is insufficient.");
        SysTryReturnResult(NID_SCL, errorCode == CALENDAR_ERROR_NONE, E_SYSTEM, "A system error has been occurred.");
        _RecordImpl::GetInstance(event)->SetRecordId(dbIndex);
 
@@ -368,6 +369,7 @@ _CalendarbookImpl::AddEvent(CalEvent& event, RecordId calendarId)
 
        errorCode = calendar_record_set_int(eventHandle, _calendar_event.calendar_book_id, calendarId);
        errorCode = calendar_db_insert_record(eventHandle, &dbIndex);
+       SysTryReturnResult(NID_SCL, errorCode != CALENDAR_ERROR_FILE_NO_SPACE, E_STORAGE_FULL, "The storage is insufficient.");
        SysTryReturnResult(NID_SCL, errorCode == CALENDAR_ERROR_NONE, E_SYSTEM, "A system error has been occurred.");
        _RecordImpl::GetInstance(event)->SetRecordId(dbIndex);
 
@@ -392,6 +394,7 @@ _CalendarbookImpl::AddTodo(CalTodo& todo)
 
        errorCode = calendar_record_set_int(todoHandle, _calendar_todo.calendar_book_id, _DEFAULT_TODO_CALENDAR_DB_ID);
        errorCode = calendar_db_insert_record(todoHandle, &dbIndex);
+       SysTryReturnResult(NID_SCL, errorCode != CALENDAR_ERROR_FILE_NO_SPACE, E_STORAGE_FULL, "The storage is insufficient.");
        SysTryReturnResult(NID_SCL, errorCode == CALENDAR_ERROR_NONE, E_SYSTEM, "A system error has been occurred.");
        _RecordImpl::GetInstance(todo)->SetRecordId(dbIndex);
 
@@ -422,6 +425,7 @@ _CalendarbookImpl::AddTodo(CalTodo& todo, RecordId calendarId)
 
        errorCode = calendar_record_set_int(todoHandle, _calendar_todo.calendar_book_id, calendarId);
        errorCode = calendar_db_insert_record(todoHandle, &dbIndex);
+       SysTryReturnResult(NID_SCL, errorCode != CALENDAR_ERROR_FILE_NO_SPACE, E_STORAGE_FULL, "The storage is insufficient.");
        SysTryReturnResult(NID_SCL, errorCode == CALENDAR_ERROR_NONE, E_SYSTEM, "A system error has been occurred.");
        _RecordImpl::GetInstance(todo)->SetRecordId(dbIndex);
 
@@ -445,6 +449,7 @@ _CalendarbookImpl::AddCalendar(Calendar& calendar)
        calendar_record_h calendarHandle = _CalendarImpl::GetInstance(calendar)->GetRecordHandle();
 
        errorCode = calendar_db_insert_record(calendarHandle, &dbIndex);
+       SysTryReturnResult(NID_SCL, errorCode != CALENDAR_ERROR_FILE_NO_SPACE, E_STORAGE_FULL, "The storage is insufficient.");
        SysTryReturnResult(NID_SCL, errorCode == CALENDAR_ERROR_NONE, E_SYSTEM, "A system error has been occurred.");
        _RecordImpl::GetInstance(calendar)->SetRecordId(dbIndex);
 
@@ -471,6 +476,7 @@ _CalendarbookImpl::AddCalendar(Calendar& calendar, AccountId accountId)
        errorCode = calendar_record_set_int(calendarHandle, _calendar_book.account_id, accountId);
 
        errorCode = calendar_db_insert_record(calendarHandle, &dbIndex);
+       SysTryReturnResult(NID_SCL, errorCode != CALENDAR_ERROR_FILE_NO_SPACE, E_STORAGE_FULL, "The storage is insufficient.");
        SysTryReturnResult(NID_SCL, errorCode == CALENDAR_ERROR_NONE, E_SYSTEM, "A system error has been occurred.");
        _RecordImpl::GetInstance(calendar)->SetRecordId(dbIndex);