Skip to content

Instantly share code, notes, and snippets.

@lubien
Created January 23, 2018 01:03
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 lubien/6bdd84127119f14230e3f8b7d2d8019c to your computer and use it in GitHub Desktop.
Save lubien/6bdd84127119f14230e3f8b7d2d8019c to your computer and use it in GitHub Desktop.
async function someHellComputation(initialData) {
const a = await fnA(initialData).catch(() => { throw 'errored on A' })
const b = await fnB(a).catch(() => { throw 'errored on B' })
return await fnC(b).catch(() => { throw 'errored on C' })
}
someHellComputation(10)
.then(console.log)
.catch(console.error)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment