mirror of
https://github.com/tc39/test262.git
synced 2025-07-25 15:04:43 +02:00
Create "Test262Error.thrower" as replacement for "$ERROR". Define $ERROR as Test262Error.thrower
This commit is contained in:
parent
f94fc660cc
commit
8250b886b0
@ -18,11 +18,12 @@ Test262Error.prototype.toString = function () {
|
|||||||
return "Test262Error: " + this.message;
|
return "Test262Error: " + this.message;
|
||||||
};
|
};
|
||||||
|
|
||||||
var $ERROR;
|
Test262Error.thrower = (...args) => {
|
||||||
$ERROR = function $ERROR(message) {
|
throw new Test262Error(...args);
|
||||||
throw new Test262Error(message);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var $ERROR = Test262Error.thrower;
|
||||||
|
|
||||||
function $DONOTEVALUATE() {
|
function $DONOTEVALUATE() {
|
||||||
throw "Test262: This statement should not be evaluated.";
|
throw "Test262: This statement should not be evaluated.";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user