Last active
July 6, 2017 07:11
-
-
Save tmpaul06/5d0c153097494d5f840e961de552226a to your computer and use it in GitHub Desktop.
Promise error handling
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
getMoneyFromAccount() | |
// buyMangoes here will throw an Error | |
.then(buyMangoes, dadBranch) | |
// Next handler in chain | |
.then(eatMangoes, handleThief) | |
The `handleThief` function is called when buyMangoes throws an exception |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment