Skip to content

Instantly share code, notes, and snippets.

@Gaafar
Last active March 16, 2017 19:36
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 Gaafar/f01a1ee86ca9937dfcdcfcbac45c6a4f to your computer and use it in GitHub Desktop.
Save Gaafar/f01a1ee86ca9937dfcdcfcbac45c6a4f to your computer and use it in GitHub Desktop.
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