Created
January 5, 2021 11:44
-
-
Save zlatkov/f36c837e36a5d1c7169c3e3ed0669bdf to your computer and use it in GitHub Desktop.
This file contains hidden or 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 { | |
foo(‘test’) | |
.then(x => console.log(x)) | |
.catch(err => console.log(err)); // The error is handled here. | |
} catch(err) { | |
// This block is not reached since the thrown error is inside of a Promise. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment