Created
February 22, 2017 08:47
-
-
Save saintedlama/eb58fa24d477492949226551cf6b62bf to your computer and use it in GitHub Desktop.
Promise catch/then
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Promise((resolve, reject) => reject('does not work')) | |
.catch(e => { console.log('caught first', e); return 1; }) | |
.then(val => console.log('first then', val)) | |
.then(val => console.log('second then', val)) | |
.catch(e => console.log('caught end', e)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment