mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 05:55:36 +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;
|
||||
};
|
||||
|
||||
var $ERROR;
|
||||
$ERROR = function $ERROR(message) {
|
||||
throw new Test262Error(message);
|
||||
Test262Error.thrower = (...args) => {
|
||||
throw new Test262Error(...args);
|
||||
};
|
||||
|
||||
var $ERROR = Test262Error.thrower;
|
||||
|
||||
function $DONOTEVALUATE() {
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user