incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [1/2] js commit: window.onerror is handled by the framework
Date Fri, 07 Sep 2012 22:17:10 GMT
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 <purplecabbage@gmail.com>
Authored: Fri Sep 7 15:15:05 2012 -0700
Committer: Jesse MacFadyen <purplecabbage@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


Mime
View raw message