Skip to content

Instantly share code, notes, and snippets.

@jjulian
Created December 16, 2009 02:27
Show Gist options
  • Save jjulian/257533 to your computer and use it in GitHub Desktop.
Save jjulian/257533 to your computer and use it in GitHub Desktop.
<%= 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