Commit 7f2ac9b6 authored by Ed Morley's avatar Ed Morley
Browse files

Bug 765200 - Shorten errors of type: "an unexpected uncaught JS exception...

Bug 765200 - Shorten errors of type: "an unexpected uncaught JS exception reported through window.onerror - ..."; r=jmaher
parent af59e3ac
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1058,9 +1058,8 @@ window.onerror = function simpletestOnerror(errorMsg, url, lineNumber) {
    // For now, for tests that self identify as having unintentional uncaught
    // exceptions, just dump it so that the error is visible but doesn't cause
    // a test failure.  See bug 652494.
    var href = SpecialPowers.getPrivilegedProps(window, 'location.href');
    var isExpected = !!SimpleTest._expectingUncaughtException;
    var message = "an " + (isExpected ? "" : "un") + "expected uncaught JS exception reported through window.onerror";
    var message = (isExpected ? "expected " : "") + "uncaught exception";
    var error = errorMsg + " at " + url + ":" + lineNumber;
    if (!SimpleTest._ignoringAllUncaughtExceptions) {
        SimpleTest.ok(isExpected, message, error);