MCPcopy Index your code
hub / github.com/caseywebdev/react-list / captureCommitPhaseError

Function captureCommitPhaseError

docs/index.js:14707–14745  ·  view source on GitHub ↗
(sourceFiber, nearestMountedAncestor, error)

Source from the content-addressed store, hash-verified

14705 (markRootUpdated$1(rootFiber, 2), ensureRootIsScheduled(rootFiber));
14706}
14707function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) {
14708 if (3 === sourceFiber.tag)
14709 captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
14710 else
14711 for (; null !== nearestMountedAncestor; ) {
14712 if (3 === nearestMountedAncestor.tag) {
14713 captureCommitPhaseErrorOnRoot(
14714 nearestMountedAncestor,
14715 sourceFiber,
14716 error
14717 );
14718 break;
14719 } else if (1 === nearestMountedAncestor.tag) {
14720 var instance = nearestMountedAncestor.stateNode;
14721 if (
14722 "function" ===
14723 typeof nearestMountedAncestor.type.getDerivedStateFromError ||
14724 ("function" === typeof instance.componentDidCatch &&
14725 (null === legacyErrorBoundariesThatAlreadyFailed ||
14726 !legacyErrorBoundariesThatAlreadyFailed.has(instance)))
14727 ) {
14728 sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
14729 error = createClassErrorUpdate(2);
14730 instance = enqueueUpdate(nearestMountedAncestor, error, 2);
14731 null !== instance &&
14732 (initializeClassErrorUpdate(
14733 error,
14734 instance,
14735 nearestMountedAncestor,
14736 sourceFiber
14737 ),
14738 markRootUpdated$1(instance, 2),
14739 ensureRootIsScheduled(instance));
14740 break;
14741 }
14742 }
14743 nearestMountedAncestor = nearestMountedAncestor.return;
14744 }
14745}
14746function attachPingListener(root, wakeable, lanes) {
14747 var pingCache = root.pingCache;
14748 if (null === pingCache) {

Callers 15

commitClassCallbacksFunction · 0.85
safelyAttachRefFunction · 0.85
safelyDetachRefFunction · 0.85
commitHostMountFunction · 0.85
commitHostUpdateFunction · 0.85

Calls 7

createClassErrorUpdateFunction · 0.85
enqueueUpdateFunction · 0.85
markRootUpdated$1Function · 0.85
ensureRootIsScheduledFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…