Skip to content

Instantly share code, notes, and snippets.

@uptownhr
Created May 10, 2016 17:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uptownhr/9453d04548be53a859ef560144c8bd06 to your computer and use it in GitHub Desktop.
Save uptownhr/9453d04548be53a859ef560144c8bd06 to your computer and use it in GitHub Desktop.
const later = new Promise( resolve => {
setTimeout(() =>{
throw new Error('wtf')
resolve('testing')
}, 1000)
})
later
.then(console.log)
.catch(console.log) // does not catch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment