Created
January 27, 2020 06:24
-
-
Save tmanOC/7de2aba94a7523f508f6a595b4fddfec to your computer and use it in GitHub Desktop.
async await version of a method that returns a promise
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
try { | |
var result = await methodThatReturnsAPromise() | |
handleResult(result) | |
} catch (err) { | |
handleAnyExceptions(err) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment