You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2012/09/08 00:17:10 UTC

[1/2] js commit: window.onerror is handled by the framework

Updated Branches:
  refs/heads/master 1ee3b9a45 -> 3258beeca


window.onerror is handled by the framework


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/3258beec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/3258beec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/3258beec

Branch: refs/heads/master
Commit: 3258beeca048bd93adaca87739119c032c2b1f23
Parents: 687928f
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Fri Sep 7 15:15:05 2012 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Fri Sep 7 15:15:05 2012 -0700

----------------------------------------------------------------------
 lib/wp7/plugin/wp7/console.js |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/3258beec/lib/wp7/plugin/wp7/console.js
----------------------------------------------------------------------
diff --git a/lib/wp7/plugin/wp7/console.js b/lib/wp7/plugin/wp7/console.js
index dd2d9be..f7d92fd 100644
--- a/lib/wp7/plugin/wp7/console.js
+++ b/lib/wp7/plugin/wp7/console.js
@@ -15,4 +15,10 @@ var debugConsole = {
     }
 };
 
+var oldOnError = window.onerror;
+window.onerror = function(msg,fileName,line) {
+    oldOnError && oldOnError(msg,fileName,line);
+    debugConsole.error(msg + " file:" + fileName + " Line:" + line);
+};
+
 module.exports = debugConsole;
\ No newline at end of file