Created
January 23, 2018 01:03
-
-
Save lubien/6bdd84127119f14230e3f8b7d2d8019c 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
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