cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: CB-9948 - Remove deprecated command format from exec.js
Date Fri, 06 Nov 2015 23:50:08 GMT
Repository: cordova-ios
Updated Branches:
  refs/heads/master dcbdb9437 -> 0c8c46ec2


CB-9948 - Remove deprecated command format from exec.js


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/0c8c46ec
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/0c8c46ec
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/0c8c46ec

Branch: refs/heads/master
Commit: 0c8c46ec26dd4b404e0a4dd303d9a55c48a69011
Parents: dcbdb94
Author: Shazron Abdullah <shazron@apache.org>
Authored: Fri Nov 6 12:49:04 2015 -0800
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Fri Nov 6 15:48:15 2015 -0800

----------------------------------------------------------------------
 cordova-js-src/exec.js | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/0c8c46ec/cordova-js-src/exec.js
----------------------------------------------------------------------
diff --git a/cordova-js-src/exec.js b/cordova-js-src/exec.js
index a0ef65d..d5354b1 100644
--- a/cordova-js-src/exec.js
+++ b/cordova-js-src/exec.js
@@ -116,18 +116,9 @@ function iOSExec() {
         // an invalid callbackId and passes it even if no callbacks were given.
         callbackId = 'INVALID';
     } else {
-        // FORMAT TWO, REMOVED
-        try {
-            splitCommand = arguments[0].split(".");
-            action = splitCommand.pop();
-            service = splitCommand.join(".");
-            actionArgs = Array.prototype.splice.call(arguments, 1);
-
-            console.log('The old format of this exec call has been removed (deprecated since
2.1). Change to: ' +
-                       "cordova.exec(null, null, \"" + service + "\", \"" + action + "\","
+ JSON.stringify(actionArgs) + ");"
-            );
-            return;
-        } catch (e) {}
+        throw new Error('The old format of this exec call has been removed (deprecated since
2.1). Change to: ' +
+            'cordova.exec(null, null, \'Service\', \'action\', [ arg1, arg2 ]);'
+        );
     }
 
     // If actionArgs is not provided, default to an empty array


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message