pad: Include .js URL in /jserror error report

This commit is contained in:
Richard Hansen 2020-10-19 23:05:54 -04:00 committed by John McLear
parent 2a8e11a49a
commit d680405f58

View file

@ -512,7 +512,16 @@ function setupGlobalExceptionHandler() {
}
//send javascript errors to the server
var errObj = {errorInfo: JSON.stringify({errorId: errorId, msg: msg, url: window.location.href, linenumber: linenumber, userAgent: navigator.userAgent})};
var errObj = {
errorInfo: JSON.stringify({
errorId,
msg,
url: window.location.href,
source: url,
linenumber,
userAgent: navigator.userAgent,
}),
};
var loc = document.location;
var url = loc.protocol + "//" + loc.hostname + ":" + loc.port + "/" + loc.pathname.substr(1, loc.pathname.indexOf("/p/")) + "jserror";