こんにちは皆さん、おかげさまで助力をいただきました。以下はBluebird promise.all中期的な約束を守って約束を続ける
は私が
function1(){
throw some error();
}
function2() {
// dosomething successfully;
}
promise.resolve()
.then()
.then(
// here i want to do promise.all and if there is any exception i want to continue with chain
promise.all(function1, function2)
.catch() // handle error here only
)
.then()
.then()
.catch()
は誰もが私はこれを達成することができますどのように私を助けることはできませんしようとしているものです。これに何らかのエラーがある場合は、promise.allを実行します。私はこの約束を破りたくはありません。
パターンの質問では、構文を修正し、 'return'は' Promise.all()の前に '.then()'呼び出し '内に含まれている期待した結果を返す必要があります – guest271314