You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2012/01/03 21:22:59 UTC

[19/28] git commit: Update PluginResult Exceptions to use latest naming scheme.

Update PluginResult Exceptions to use latest naming scheme.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/commit/80aa5ee5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/tree/80aa5ee5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/diff/80aa5ee5

Branch: refs/heads/master
Commit: 80aa5ee5669c8e3acf06ab3b036997aee135a591
Parents: 19c0e68
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Fri Nov 25 12:35:42 2011 -0800
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Fri Nov 25 12:35:42 2011 -0800

----------------------------------------------------------------------
 framework/ext/src/com/phonegap/device/Device.java |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/80aa5ee5/framework/ext/src/com/phonegap/device/Device.java
----------------------------------------------------------------------
diff --git a/framework/ext/src/com/phonegap/device/Device.java b/framework/ext/src/com/phonegap/device/Device.java
index 42363e1..8cbbad7 100644
--- a/framework/ext/src/com/phonegap/device/Device.java
+++ b/framework/ext/src/com/phonegap/device/Device.java
@@ -34,7 +34,7 @@ public final class Device extends Plugin {
 	public static final String ACTION_GET_DEVICE_INFO = "getDeviceInfo";
 		
 	public PluginResult execute(String action, JSONArray args, String callbackId) {
-		PluginResult result = new PluginResult(PluginResult.Status.INVALIDACTION, "Device: Invalid action:" + action);
+		PluginResult result = new PluginResult(PluginResult.Status.INVALID_ACTION, "Device: Invalid action:" + action);
 		
 		if(action.equals(ACTION_GET_DEVICE_INFO)){
 			try {
@@ -46,7 +46,7 @@ public final class Device extends Plugin {
 				device.put( FIELD_VERSION, new String(DeviceInfo.getSoftwareVersion()) );
 				result = new PluginResult(PluginResult.Status.OK, device);
 			} catch (JSONException e) {
-				result = new PluginResult(PluginResult.Status.JSONEXCEPTION, e.getMessage());
+				result = new PluginResult(PluginResult.Status.JSON_EXCEPTION, e.getMessage());
 			}					
 		}