dosomething successfully; .then() // here i want to do promise.alland if there is any exception i want to continue with chain
promise.all(function1, function2)如果其中有任何错误,则执行promise.all。我不想打破这条承诺链。
Promise.all(可迭代)是全部或没有,这意味着它返回的承诺在可迭代承诺中的每一个承诺解决时解析,或在其中一个承诺拒绝时立即拒绝,其原因是第一个拒绝承诺()。但是,如果可迭代拒绝的多个承诺发生了什么呢?
在VSCode中,我尝试了以下示例,并故意使foo()和bar()承诺都失败。我认为这是因为当我调用Promise.reject时,Promise.all已经收到了foo函数的拒绝,这个函数也失败了,但是还不清楚发生了什么。insert into test (va