diff --git a/src/static/js/pad_utils.js b/src/static/js/pad_utils.js
index 82f7fcada..ea4157bf3 100644
--- a/src/static/js/pad_utils.js
+++ b/src/static/js/pad_utils.js
@@ -514,18 +514,18 @@ function setupGlobalExceptionHandler() {
if (!globalExceptionHandler) {
globalExceptionHandler = function test (msg, url, linenumber)
{
+ var loc = document.location;
var errorId = randomString(20);
if ($("#editorloadingbox").attr("display") != "none"){
//show javascript errors to the user
$("#editorloadingbox").css("padding", "10px");
$("#editorloadingbox").css("padding-top", "45px");
$("#editorloadingbox").html("
An error occuredThe error was reported with the following id: '" + errorId + "'
Please send this error message to us: '"
- + "ErrorId: " + errorId + "
UserAgent: " + navigator.userAgent + "
" + msg + " in " + url + " at line " + linenumber + "'
");
+ + "ErrorId: " + errorId + "
URL: " + loc + "
UserAgent: " + navigator.userAgent + "
" + msg + " in " + url + " at line " + linenumber + "'");
}
//send javascript errors to the server
- var errObj = {errorInfo: JSON.stringify({errorId: errorId, msg: msg, url: url, linenumber: linenumber, userAgent: navigator.userAgent})};
- var loc = document.location;
+ var errObj = {errorInfo: JSON.stringify({errorId: errorId, url: loc, msg: msg, url: url, linenumber: linenumber, userAgent: navigator.userAgent})};
var url = loc.protocol + "//" + loc.hostname + ":" + loc.port + "/" + loc.pathname.substr(1, loc.pathname.indexOf("/p/")) + "jserror";
$.post(url, errObj);