1 2 3 4 5 6 7
/*--- flags: [qjs:track-promise-rejections] ---*/ const promise = Promise.reject('reject') const error = await Promise.resolve().then(() => promise).catch(e => e) print('Got this error:', error)