errorCallback( errorCode ) type

Callback function that is invoked in case of an error.

Syntax

errorCallback( errorCode )

Parameters

Example

function errorCallback(errCode) {
   //Set the default error message. Used if an invalid code is passed to the
   //function (just in case) but also to cover the
   //sap.EncryptedStorage.ERROR_UNKNOWN case as well.
   var msg = "Unkown Error";
   switch (errCode) {
      case sap.EncryptedStorage.ERROR_INVALID_PARAMETER:
         msg = "Invalid parameter passed to method";
         break;
      case sap.EncryptedStorage.ERROR_BAD_PASSWORD :
         msg = "Incorrect password";
         break;
      case sap.EncryptedStorage.ERROR_GREATER_THAN_MAXIMUM_SIZE:
         msg = "Item (string) value too large to write to store";
         break;
   };
   //Write the error to the log
   console.error(msg);
   //Let the user know what happened
   navigator.notification.alert(msg, null, "EncryptedStorage Error", "OK");
};

Source

encryptedstorage.js, line 359.