-
-
Save kepta/d449d19737d16e15a96d61f92404251b to your computer and use it in GitHub Desktop.
This file contains 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
.then(function() { | |
return Promise.reject(new Error('something wrong happened')); | |
}).catch(function(e) { | |
console.error(e); // something wrong happened | |
}); | |
.then(function() { | |
return Promise.reject(new Error('something wrong happened')); | |
}, function(e) { // callback handles error coming from the chain above the current `.then` | |
console.error(e); // no error logged | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment