MCPcopy Create free account
hub / github.com/reactjs/react-rails / createRootErrorUpdate

Function createRootErrorUpdate

lib/assets/react-source/development/react.js:24390–24407  ·  view source on GitHub ↗
(fiber, errorInfo, expirationTime)

Source from the content-addressed store, hash-verified

24388 var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;
24389
24390 function createRootErrorUpdate(fiber, errorInfo, expirationTime) {
24391 var update = createUpdate(expirationTime, null); // Unmount the root by rendering null.
24392
24393 update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property
24394 // being called "element".
24395
24396 update.payload = {
24397 element: null
24398 };
24399 var error = errorInfo.value;
24400
24401 update.callback = function () {
24402 onUncaughtError(error);
24403 logError(fiber, errorInfo);
24404 };
24405
24406 return update;
24407 }
24408
24409 function createClassErrorUpdate(fiber, errorInfo, expirationTime) {
24410 var update = createUpdate(expirationTime, null);

Callers 2

throwExceptionFunction · 0.85

Calls 2

createUpdateFunction · 0.85
logErrorFunction · 0.85

Tested by

no test coverage detected