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

Function initializeClassErrorUpdate

docs/index.js:8736–8761  ·  view source on GitHub ↗
(update, root, fiber, errorInfo)

Source from the content-addressed store, hash-verified

8734 return lane;
8735}
8736function initializeClassErrorUpdate(update, root, fiber, errorInfo) {
8737 var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
8738 if ("function" === typeof getDerivedStateFromError) {
8739 var error = errorInfo.value;
8740 update.payload = function () {
8741 return getDerivedStateFromError(error);
8742 };
8743 update.callback = function () {
8744 logCaughtError(root, fiber, errorInfo);
8745 };
8746 }
8747 var inst = fiber.stateNode;
8748 null !== inst &&
8749 "function" === typeof inst.componentDidCatch &&
8750 (update.callback = function () {
8751 logCaughtError(root, fiber, errorInfo);
8752 "function" !== typeof getDerivedStateFromError &&
8753 (null === legacyErrorBoundariesThatAlreadyFailed
8754 ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this]))
8755 : legacyErrorBoundariesThatAlreadyFailed.add(this));
8756 var stack = errorInfo.stack;
8757 this.componentDidCatch(errorInfo.value, {
8758 componentStack: null !== stack ? stack : ""
8759 });
8760 });
8761}
8762function throwException(
8763 root,
8764 returnFiber,

Callers 3

throwExceptionFunction · 0.85
captureCommitPhaseErrorFunction · 0.85
updateClassComponentFunction · 0.85

Calls 4

logCaughtErrorFunction · 0.85
runWithFiberInDEVFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…