async function handleLater(func) {
  try {
    return [await func(), undefined]
  } catch (e) {
    return [undefined, e]
  }
}
// WARNING: Make sure thrown values get handled, otherwise they'll get swallowed. This is effectively a work-around for unhandled rejection warnings/errors.
Make sure thrown values get handled, otherwise they'll get swallowed. This is effectively a work-around for unhandled rejection warnings/errors.
Make sure thrown values get handled otherwise they ' ll get swallowed . This is effectively a work - around for unhandled rejection warnings / errors .
async function handleLater(func) {
  try {
    return [await func(), undefined]
  } catch (e) {
    return [undefined, e]
  }
}
async function handleLater ( func ) { try { return [ await func ( ) , undefined ] } catch ( e ) { return [ undefined , e ] } }
WARNING: Make sure thrown values get handled, otherwise they'll get swallowed.
WARNING : Make sure thrown values get handled otherwise they ' ll get swallowed .