Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new Promise(function(resolve, reject) {
- //setTimeout(() => resolve(1), 1000);
- setTimeout(() => reject(1), 1000);
- })
- .then((result) => {
- throw new Error('FAILED_HERE_111! ');
- console.log('result111: ', result)
- return result + 1;
- })
- .catch((e) => {
- console.log('error111: ', e)
- return e + 111;
- })
- .then((result) => {
- throw new Error('FAILED_HERE_222! ');
- console.log('result222: ', result)
- return result + 2;
- })
- .catch((e) => {
- console.log('error222: ', e)
- return e + 222;
- })
- .then((result) => {
- console.log('result333: ', result)
- return result + 3;
- })
- .catch((e) => {
- console.log('error333: ', e)
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement