Workshop auth fixes and better error reporting

This commit is contained in:
Godwin
2017-07-19 20:29:25 -07:00
parent c21cc05c99
commit e8ca73a801
20 changed files with 371 additions and 332 deletions
+4 -2
View File
@@ -1,5 +1,5 @@
(function() {
window.onerror = function(message, url, lineNumber) {
window.onerror = function(message, url, lineNumber, column, errorObj) {
//save error and send to server for example.
var request = new XMLHttpRequest();
request.open('POST', '/js_error', true);
@@ -7,7 +7,9 @@
request.send(
'message=' + encodeURI(message) +
'&url=' + encodeURI(url) +
'&lineNumber=' + encodeURI(lineNumber) +
'&line=' + encodeURI(lineNumber) +
'&col=' + encodeURI(column) +
(errorObj && errorObj.stack ? '&stack=' + encodeURI(errorObj.stack) : '') +
'&location=' + encodeURI(window.location.href)
);
return false;