--- a/javaextensions/pim/javasrc/com/nokia/mj/impl/pim/PIMManager.java Fri Sep 17 16:44:34 2010 +0300
+++ b/javaextensions/pim/javasrc/com/nokia/mj/impl/pim/PIMManager.java Mon Oct 04 11:29:25 2010 +0300
@@ -430,7 +430,7 @@
NativeError.handleCreateCalendarError(error, aCalName);
}
- private synchronized void deleteCalendar(String aCalName)
+ private synchronized void deleteCalendar(String aCalName) throws PIMException
{
// security check
ApplicationUtils appUtils = ApplicationUtils.getInstance();
@@ -464,12 +464,16 @@
break;
}
}
- int error = _deleteCalendar(iManagerHandle, fileName);
- NativeError.handleDeleteCalendarError(error, aCalName);
if (isCalPresent)
{
+ int error = _deleteCalendar(iManagerHandle, fileName);
+ NativeError.handleDeleteCalendarError(error, aCalName);
iCalInfo.removeElementAt(index);
}
+ else
+ {
+ throw new PIMException("Can't delete specified calendar as calendar does not exist ", PIMException.LIST_NOT_ACCESSIBLE);
+ }
}
/**