79368548

Date: 2025-01-19 07:19:38
Score: 0.5
Natty:
Report link

Promises have their own catch clause. You can catch it through that.

try {
  new Promise((res, rej) => rej(new Error('You cannot catch me. Haha')))
             .catch(error => console.log("caught"));
} catch (err) {
    conosle.error(err);
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: ralzohairi