MCPcopy Index your code
hub / github.com/krasimir/react-in-patterns / logError

Function logError

code/redux/public/app.js:11430–11465  ·  view source on GitHub ↗
(boundary, errorInfo)

Source from the content-addressed store, hash-verified

11428
11429
11430function logError(boundary, errorInfo) {
11431 var source = errorInfo.source;
11432 var stack = errorInfo.stack;
11433 if (stack === null) {
11434 stack = getStackAddendumByWorkInProgressFiber(source);
11435 }
11436
11437 var capturedError = {
11438 componentName: source !== null ? getComponentName(source) : null,
11439 error: errorInfo.value,
11440 errorBoundary: boundary,
11441 componentStack: stack !== null ? stack : '',
11442 errorBoundaryName: null,
11443 errorBoundaryFound: false,
11444 willRetry: false
11445 };
11446
11447 if (boundary !== null) {
11448 capturedError.errorBoundaryName = getComponentName(boundary);
11449 capturedError.errorBoundaryFound = capturedError.willRetry = boundary.tag === ClassComponent;
11450 } else {
11451 capturedError.errorBoundaryName = null;
11452 capturedError.errorBoundaryFound = capturedError.willRetry = false;
11453 }
11454
11455 try {
11456 logCapturedError(capturedError);
11457 } catch (e) {
11458 // Prevent cycle if logCapturedError() throws.
11459 // A cycle may still occur if logCapturedError renders a component that throws.
11460 var suppressLogging = e && e.suppressReactErrorLogging;
11461 if (!suppressLogging) {
11462 console.error(e);
11463 }
11464 }
11465}
11466
11467var ReactFiberCommitWork = function (config, captureError, scheduleWork, computeExpirationForFiber, markLegacyErrorBoundaryAsFailed, recalculateCurrentTime) {
11468 var getPublicInstance = config.getPublicInstance,

Callers 1

commitErrorLoggingFunction · 0.70

Calls 3

getComponentNameFunction · 0.70
logCapturedErrorFunction · 0.70

Tested by

no test coverage detected