Created
March 20, 2013 14:44
-
-
Save pschyska/5205194 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Legacy cm.e support | |
if (cm.e) { | |
snippetNeedsUpdating = true; | |
// Process queued errors | |
for (var i=0; i < cm.e.length; i+=1) { | |
cm.onerror.apply(this, cm.e[i]); | |
} | |
// Override push to immediately call onerror | |
cm.e.push = function(message, file, line, column) { | |
cm.onerror(message, file, line, column); | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window._crashmat = { | |
key: "mj8c", | |
// TODO: find a way to get the environment without using sencha, | |
// otherwise we can't report errors during loading | |
env: bp.config.Main.env, | |
debug: true | |
}; | |
(function(w, d, cm, woe) { | |
w.onerror = function(e,f,l,c) { | |
debugger; | |
cm.e = cm.e || []; cm.e.push([e,f,l,c]); | |
if (woe) woe(e,f,l,c); | |
}; | |
var e = d.createElement('script'); | |
e.async = true; | |
e.src = 'https://db2uk9yp28y61.cloudfront.net/'; | |
(d.head || d.getElementsByTagName('head')[0]).appendChild(e); | |
})(window, document, window._crashmat, window.onerror); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment