* @param {Promise} promise
(promise)
| 201 | * @param {Promise} promise |
| 202 | */ |
| 203 | function handledRejection(promise) { |
| 204 | if (pendingUnhandledRejections.has(promise)) { |
| 205 | pendingUnhandledRejections.delete(promise); |
| 206 | return; |
| 207 | } |
| 208 | const promiseInfo = maybeUnhandledPromises.get(promise); |
| 209 | if (promiseInfo !== undefined) { |
| 210 | maybeUnhandledPromises.delete(promise); |
| 211 | if (promiseInfo.warned) { |
| 212 | // Generate the warning object early to get a good stack trace. |
| 213 | const warning = new PromiseRejectionHandledWarning(promiseInfo.uid); |
| 214 | asyncHandledRejections.push({ promise, warning }); |
| 215 | setHasRejectionToWarn(true); |
| 216 | } |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | const unhandledRejectionErrName = UnhandledPromiseRejectionWarning.name; |
| 221 |
no test coverage detected
searching dependent graphs…