Sawtaytoes
3/2/2019 - 6:17 AM

Try-Catch Uncaught Promise Error

const throwError = () => {
  throw "I'm an error!"
}

try {
  Promise
  .resolve()
  .then(throwError)
}
catch (error) {
  console
  .log(error)
}

// Uncaught (in promise) I'm an error!