diff --git a/toolkit/devtools/server/main.js b/toolkit/devtools/server/main.js index 73f60ab8779..ab385abf96d 100644 --- a/toolkit/devtools/server/main.js +++ b/toolkit/devtools/server/main.js @@ -49,7 +49,9 @@ function loadSubScript(aURL) .getService(Ci.mozIJSSubScriptLoader); loader.loadSubScript(aURL, this); } catch(e) { - let errorStr = "Error loading: " + aURL + ": " + e + " - " + e.stack + "\n"; + let errorStr = "Error loading: " + aURL + ":\n" + + (e.fileName ? "at " + e.fileName + " : " + e.lineNumber + "\n" : "") + + e + " - " + e.stack + "\n"; dump(errorStr); Cu.reportError(errorStr); throw e;