1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 10:22:23 +00:00

Update object.md

Delete an extra comma.
This commit is contained in:
5unnyWind 2022-03-02 11:41:21 +08:00 committed by GitHub
parent 9218ba8731
commit ce7fd81845
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -708,7 +708,7 @@ let aWithXGetter = { ...a }; // 报错
ES2021 标准之中,为了配合新增的`Promise.any()`方法详见《Promise 对象》一章),还引入一个新的错误对象`AggregateError`,也放在这一章介绍。
AggregateError 在一个错误对象里面,封装了多个错误。如果某个单一操作,同时引发了多个错误,需要同时抛出这些错误,那么就可以抛出一个 AggregateError 错误对象,把各种错误都放在这个对象里面。
AggregateError 在一个错误对象里面,封装了多个错误。如果某个单一操作,同时引发了多个错误,需要同时抛出这些错误,那么就可以抛出一个 AggregateError 错误对象,把各种错误都放在这个对象里面。
AggregateError 本身是一个构造函数,用来生成 AggregateError 实例对象。