JSFiddle - React, Tailwind, and code Playground
JavaScript
async function throwingPromise() {
throw new Error('Hello!')
}
console.log('here')
async function main() {
try {
throwingPromise()
} catch (error) {
console.log('error caught!')
}
}
main()