Skip to content

Instantly share code, notes, and snippets.

@hexode
Created November 18, 2016 17:15
Show Gist options
  • Select an option

  • Save hexode/6e026efc19afc2be9f4c9fb08ad6077b to your computer and use it in GitHub Desktop.

Select an option

Save hexode/6e026efc19afc2be9f4c9fb08ad6077b to your computer and use it in GitHub Desktop.
Handling error in promises
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