MCPcopy Index your code
hub / github.com/angular/angular / clearRejectedNoCatch

Function clearRejectedNoCatch

packages/zone.js/lib/common/promise.ts:252–272  ·  view source on GitHub ↗
(this: unknown, promise: ZoneAwarePromise<any>)

Source from the content-addressed store, hash-verified

250
251 const REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler');
252 function clearRejectedNoCatch(this: unknown, promise: ZoneAwarePromise<any>): void {
253 if ((promise as any)[symbolState] === REJECTED_NO_CATCH) {
254 // if the promise is rejected no catch status
255 // and queue.length > 0, means there is a error handler
256 // here to handle the rejected promise, we should trigger
257 // windows.rejectionhandled eventHandler or nodejs rejectionHandled
258 // eventHandler
259 try {
260 const handler = (Zone as any)[REJECTION_HANDLED_HANDLER];
261 if (handler && typeof handler === 'function') {
262 handler.call(this, {rejection: (promise as any)[symbolValue], promise: promise});
263 }
264 } catch (err) {}
265 (promise as any)[symbolState] = REJECTED;
266 for (let i = 0; i < _uncaughtPromiseErrors.length; i++) {
267 if (promise === _uncaughtPromiseErrors[i].promise) {
268 _uncaughtPromiseErrors.splice(i, 1);
269 }
270 }
271 }
272 }
273
274 function scheduleResolveOrReject<R, U1, U2>(
275 promise: ZoneAwarePromise<any>,

Callers 2

resolvePromiseFunction · 0.85
scheduleResolveOrRejectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…