Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Remove AggregateError.prototype.toString #49
mathiasbynens left a comment
LGTM. (This section was originally added because the first draft meant to specify the error message differently. However, instead this should be done through the already-implementation-defined value of the
I’ll wait for @chicoxyzzy’s review before merging.
bakkot left a comment
Note that the two functions are not totally identical, in that
let error = new AggregateError(); error.name = void 0; error.toString();
would prior to this change have given "AggregateError" and after it will give "Error".
I don't think anyone will ever notice that without starting from the spec, though, and since no other error type has that behavior anyway this seems an improvement.
CC @leobalter because test262 requires updates after this change.
The following tests probably need to be updated:
And while there these two tests also need fixes (they call AggregateError without an iterable argument, resulting in throwing a TypeError).
These six tests failed when running test262 with the