(boundary, errorInfo)
| 10410 | |
| 10411 | |
| 10412 | function logError(boundary, errorInfo) { |
| 10413 | var source = errorInfo.source; |
| 10414 | var stack = errorInfo.stack; |
| 10415 | if (stack === null) { |
| 10416 | stack = getStackAddendumByWorkInProgressFiber(source); |
| 10417 | } |
| 10418 | |
| 10419 | var capturedError = { |
| 10420 | componentName: source !== null ? getComponentName(source) : null, |
| 10421 | error: errorInfo.value, |
| 10422 | errorBoundary: boundary, |
| 10423 | componentStack: stack !== null ? stack : '', |
| 10424 | errorBoundaryName: null, |
| 10425 | errorBoundaryFound: false, |
| 10426 | willRetry: false |
| 10427 | }; |
| 10428 | |
| 10429 | if (boundary !== null) { |
| 10430 | capturedError.errorBoundaryName = getComponentName(boundary); |
| 10431 | capturedError.errorBoundaryFound = capturedError.willRetry = boundary.tag === ClassComponent; |
| 10432 | } else { |
| 10433 | capturedError.errorBoundaryName = null; |
| 10434 | capturedError.errorBoundaryFound = capturedError.willRetry = false; |
| 10435 | } |
| 10436 | |
| 10437 | try { |
| 10438 | logCapturedError(capturedError); |
| 10439 | } catch (e) { |
| 10440 | // Prevent cycle if logCapturedError() throws. |
| 10441 | // A cycle may still occur if logCapturedError renders a component that throws. |
| 10442 | var suppressLogging = e && e.suppressReactErrorLogging; |
| 10443 | if (!suppressLogging) { |
| 10444 | console.error(e); |
| 10445 | } |
| 10446 | } |
| 10447 | } |
| 10448 | |
| 10449 | var ReactFiberCommitWork = function (config, captureError, scheduleWork, computeExpirationForFiber, markLegacyErrorBoundaryAsFailed, recalculateCurrentTime) { |
| 10450 | var getPublicInstance = config.getPublicInstance, |
no test coverage detected