Last active
March 16, 2017 19:36
-
-
Save Gaafar/f01a1ee86ca9937dfcdcfcbac45c6a4f 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
const makeRequest = async () => { | |
await callAPromise() | |
await callAPromise() | |
await callAPromise() | |
await callAPromise() | |
await callAPromise() | |
throw new Error("oops"); | |
} | |
makeRequest() | |
.catch(err => { | |
console.log(err); | |
// output | |
// Error: oops at makeRequest (index.js:7:9) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment