javaextensions/pim/javasrc.s60/com/nokia/mj/impl/pim/utils/NativeError.java
changeset 78 71ad690e91f5
parent 72 1f0034e370aa
--- a/javaextensions/pim/javasrc.s60/com/nokia/mj/impl/pim/utils/NativeError.java	Fri Sep 17 16:44:34 2010 +0300
+++ b/javaextensions/pim/javasrc.s60/com/nokia/mj/impl/pim/utils/NativeError.java	Mon Oct 04 11:29:25 2010 +0300
@@ -647,8 +647,6 @@
     public static void handleCreateCalendarError(int aNativeErrorCode, String aCalName) 
     throws PIMException
     {
-
-
         if (aNativeErrorCode == OsErrorMessage.SUCCESS)
         {
             return; // OK
@@ -670,7 +668,7 @@
         }
         case OsErrorMessage.KERR_ALREADY_EXISTS:
         {
-             throw new PIMException(ErrorString.CALENDAR_ALREADY_EXISTS, PIMException.GENERAL_ERROR);
+             throw new PIMException(ErrorString.CALENDAR_ALREADY_EXISTS, aNativeErrorCode);
         }
         default:
         {
@@ -679,7 +677,7 @@
         }
     }
 
-    public static void handleDeleteCalendarError(int aNativeErrorCode, String aCalName)
+    public static void handleDeleteCalendarError(int aNativeErrorCode, String aCalName) throws PIMException
     {
 
 
@@ -692,8 +690,7 @@
         {
         case OsErrorMessage.KERR_ACCESS_DENIED:
         {
-            throw new IllegalArgumentException(
-                "Deletion of calendar failed: phone default calendar cannot be deleted");
+            throw new PIMException("The default calendar cannot be deleted",  aNativeErrorCode);
         }
         case OsErrorMessage.KERR_ARGUMENT:
         {