Last active
October 3, 2018 17:39
-
-
Save nem035/5b3c77cad88459e792676344bc136a0b 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
// this doesn't work | |
try { | |
httpGet(function callback() { | |
// an error caused asynchronously | |
// cannot be caught via a callback | |
// mechanism | |
}) | |
} catch (err) { | |
// this will only get called if httpGet | |
// itself throws a synchronous error | |
// but not if our callback throws an | |
// error instead. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment