Last active
December 24, 2015 03:19
-
-
Save benmccormick/d41d02c24d53d355d32a to your computer and use it in GitHub Desktop.
Promises swallow exceptions
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
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