javaextensions/pim/javasrc.s60/com/nokia/mj/impl/pim/utils/NativeError.java
changeset 79 2f468c1958d0
parent 76 4ad59aaee882
child 78 71ad690e91f5
equal deleted inserted replaced
76:4ad59aaee882 79:2f468c1958d0
   642         {
   642         {
   643             throw new GenericException(ErrorString.GENERAL_ERROR_COLON + aNativeErrorCode);
   643             throw new GenericException(ErrorString.GENERAL_ERROR_COLON + aNativeErrorCode);
   644         }
   644         }
   645         }
   645         }
   646     }
   646     }
   647     public static void handleCreateCalendarError(int aNativeErrorCode, String aCalName)
   647     public static void handleCreateCalendarError(int aNativeErrorCode, String aCalName) 
       
   648     throws PIMException
   648     {
   649     {
   649 
   650 
   650 
   651 
   651         if (aNativeErrorCode == OsErrorMessage.SUCCESS)
   652         if (aNativeErrorCode == OsErrorMessage.SUCCESS)
   652         {
   653         {
   667                 "Creation of calendar failed: calendar name is not valid "
   668                 "Creation of calendar failed: calendar name is not valid "
   668                 + aCalName);
   669                 + aCalName);
   669         }
   670         }
   670         case OsErrorMessage.KERR_ALREADY_EXISTS:
   671         case OsErrorMessage.KERR_ALREADY_EXISTS:
   671         {
   672         {
   672             throw new RuntimeException(ErrorString.CALENDAR_ALREADY_EXISTS);
   673              throw new PIMException(ErrorString.CALENDAR_ALREADY_EXISTS, PIMException.GENERAL_ERROR);
   673         }
   674         }
   674         default:
   675         default:
   675         {
   676         {
   676             throw new GenericException(ErrorString.GENERAL_ERROR_COLON + aNativeErrorCode);
   677             throw new GenericException(ErrorString.GENERAL_ERROR_COLON + aNativeErrorCode);
   677         }
   678         }