Created
December 16, 2009 02:27
-
-
Save jjulian/257533 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
<%= javascript_include_tag 'jquery-1.3.2.js' %> | |
<% javascript_tag do %> | |
jQuery(function(){ | |
window.onerror = function(msg, url, line) { | |
if (console && console.log) { | |
console.log("sending error: " + msg + "\n" + url + ":" + line); | |
} | |
$.post('/errors', {message: msg, url: url, line: line, form_authenticity_token: '<%= form_authenticity_token %>'}); | |
return true; | |
}; | |
}); | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment