michael@0: // Compiling a script with null filename does not break the Error constructor. michael@0: michael@0: var exc = null; michael@0: try { michael@0: evaluate("throw Error('pass');", {fileName: null}); michael@0: } catch (x) { michael@0: exc = x; michael@0: } michael@0: assertEq(exc.constructor, Error); michael@0: assertEq(exc.message, "pass"); michael@0: assertEq(exc.fileName, "");