(boundary, errorInfo)
| 11428 | |
| 11429 | |
| 11430 | function 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 | |
| 11467 | var ReactFiberCommitWork = function (config, captureError, scheduleWork, computeExpirationForFiber, markLegacyErrorBoundaryAsFailed, recalculateCurrentTime) { |
| 11468 | var getPublicInstance = config.getPublicInstance, |
no test coverage detected