Skip to content

Instantly share code, notes, and snippets.

@pionize

pionize/.js Secret

Created April 27, 2017 07:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pionize/8cbafa3e6a147dd0ba0b3000cb49f7c2 to your computer and use it in GitHub Desktop.
Save pionize/8cbafa3e6a147dd0ba0b3000cb49f7c2 to your computer and use it in GitHub Desktop.
somePromise().then(function () {
throw new Error('ehm..error!');
}).catch(function (err) {
// I caught your error
});
somePromise().then(function () {
throw new Error('ehm..error!');
}, function (err) {
// I didn't catch your error
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment