cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sgreb...@apache.org
Subject cordova-plugin-test-framework git commit: CB-8388 Prevent Windows app from crashing on test failure
Date Fri, 30 Jan 2015 20:50:57 GMT
Repository: cordova-plugin-test-framework
Updated Branches:
  refs/heads/master 0bc62606e -> 84382143d


CB-8388 Prevent Windows app from crashing on test failure

github: close #9


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-test-framework/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-test-framework/commit/84382143
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-test-framework/tree/84382143
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-test-framework/diff/84382143

Branch: refs/heads/master
Commit: 84382143d095ca85e0332708dbe8682f0bfbd6c1
Parents: 0bc6260
Author: Nikhil Khandelwal <nikhilkh@microsoft.com>
Authored: Fri Jan 30 08:42:32 2015 -0800
Committer: sgrebnov <v-segreb@microsoft.com>
Committed: Fri Jan 30 23:50:27 2015 +0300

----------------------------------------------------------------------
 www/main.js | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-test-framework/blob/84382143/www/main.js
----------------------------------------------------------------------
diff --git a/www/main.js b/www/main.js
index f83b7b2..2b76786 100644
--- a/www/main.js
+++ b/www/main.js
@@ -380,6 +380,15 @@ function runMain() {
           history.go(-1);
       });
   }
+
+  if (cordova.platformId === "windows" || cordova.platformId === "windows8") {
+    var app = WinJS.Application;
+    app.addEventListener("error", function (err) {
+        // We do not want an unhandled exception to crash the test app
+        // Retruning true marks it as being handled
+        return true;
+      });
+  }
 }
 
 /******************************************************************************/


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


Mime
View raw message