Promise.resolve()
.then(() => { // then1
throw "err1";
})
.then(() => { // then2
})
.catch((reason) => { // catch1
console.log(reason);
throw "err2";
})
.catch((reason) => { // catch2
console.log(reason);
});
如上面代码,then2 回调虽然不执行,但是如何跳到 catch2 的?