You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/06/26 20:21:56 UTC

[2/2] android commit: Explicitly print exceptions that occur within ExposedJsApi.

Explicitly print exceptions that occur within ExposedJsApi.

Before they trickled into JNI and the stack traces were lost.
(cherry picked from commit 10d31ea0a30ec47d68c79813d56e7506b1542f7e)


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

Branch: refs/heads/3.0.0
Commit: f42e5f66fdd79a730b4552f5813fbfbcfc607533
Parents: 16e0838
Author: Andrew Grieve <ag...@chromium.org>
Authored: Wed Jun 26 14:20:45 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Jun 26 14:21:48 2013 -0400

----------------------------------------------------------------------
 framework/src/org/apache/cordova/ExposedJsApi.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/f42e5f66/framework/src/org/apache/cordova/ExposedJsApi.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/ExposedJsApi.java b/framework/src/org/apache/cordova/ExposedJsApi.java
index 40ab1e3..221dd3d 100755
--- a/framework/src/org/apache/cordova/ExposedJsApi.java
+++ b/framework/src/org/apache/cordova/ExposedJsApi.java
@@ -54,6 +54,9 @@ import org.json.JSONException;
                 ret = jsMessageQueue.popAndEncode();
             }
             return ret;
+        } catch (Throwable e) {
+            e.printStackTrace();
+            return "";
         } finally {
             jsMessageQueue.setPaused(false);
         }