Created
September 12, 2020 09:37
-
-
Save sahilrajput03/1559de3ca485a23af3c101da2a3ca15a to your computer and use it in GitHub Desktop.
exception catpuring with closures.
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
noExcepttion(() => | |
new Promise((res, rej) => { | |
rej('error occured due to storm'); | |
}) | |
); | |
function noExcepttion(cb) { | |
cb().catch((t) => console.log(`::INFO::NOEXCEPTION:: ${t}`)); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment