Bug 977043 - Improve error reporting when an actor fails loading r=past

This commit is contained in:
Alexandre Poirot 2014-03-22 09:02:13 +01:00
parent f25375066a
commit 3505c5566b

View File

@ -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;