async function f() { try { await Promise.reject(new Error("boom")); } catch (e) { return "caught:" + e.message; } } console.log(await f());