Created
March 31, 2015 08:41
-
-
Save tkissing/786bd8381fd5688bb9c9 to your computer and use it in GitHub Desktop.
Careful when using .then(successHandler, errorHandler) - it might not do what you mean to do!
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
(function() { | |
p = Promise.resolve(3); | |
p.then(function() { throw Error('e'); }, console.warn.bind(console, 'You will not see this one')); | |
p.then(function() { throw Error('e'); }).then(null, console.warn.bind(console, 'You will see this one')); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment