Created
April 17, 2019 08:29
-
-
Save SegersIan/2373fc10379efb97224bd5b22cf56c45 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 thisThrows() { | |
throw new Error("Thrown from thisThrows()"); | |
} | |
try { | |
thisThrows(); | |
} catch (e) { | |
console.error(e); | |
} finally { | |
console.log('We do cleanup here'); | |
} | |
// output: | |
// We do cleanup here | |
// UnhandledPromiseRejectionWarning: Error: Thrown from thisThrows() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment