Created
November 18, 2016 17:15
-
-
Save hexode/6e026efc19afc2be9f4c9fb08ad6077b to your computer and use it in GitHub Desktop.
Handling error in promises
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
new Promise.reject(new CustomError()) | |
.catch(handleError(CustomError, () => { | |
})) | |
.catch(handleError(AnotherError, () => { | |
})) | |
.catch(handleError(Error, () => { | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment