Skip to content

Instantly share code, notes, and snippets.

@benmccormick
Last active December 24, 2015 03:19
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 benmccormick/d41d02c24d53d355d32a to your computer and use it in GitHub Desktop.
Save benmccormick/d41d02c24d53d355d32a to your computer and use it in GitHub Desktop.
Promises swallow exceptions
try {
fetch('/some/data').then(function() {
throw 'error';
})
} catch(e) {
//this code won't be executed
console.log('Exception Caught')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment