Synchronous promise syntax supports exception handling via plain try-catch:
try-catch
async function func() { try { let res = await getSmth(2); console.log(res); } catch (err) { console.log(err); } } func();