虽然我知道这段代码很乱,但会导致意想不到的结果吗?
someFunction(args, agency) {
var promise = new Promise(
(resolve, reject) => {
return promise1(args1)
.then((resp1) => {
return promise2(args2)
.then((resp2) => {
return promise3(args3)
.then((resp3) => {
return promise4(args4)
.then((resp4) => {
resolve(resp4);
})
})
.catch(function (error) {
reject(error);
});
}).catch(function (error) {
reject(error);
});
}).catch(function (error) {
reject(error);
});
}
);
return promise;
}