(boundary, errorInfo)
| 11171 | |
| 11172 | |
| 11173 | function logError(boundary, errorInfo) { |
| 11174 | var source = errorInfo.source; |
| 11175 | var stack = errorInfo.stack; |
| 11176 | if (stack === null) { |
| 11177 | stack = getStackAddendumByWorkInProgressFiber(source); |
| 11178 | } |
| 11179 | |
| 11180 | var capturedError = { |
| 11181 | componentName: source !== null ? getComponentName(source) : null, |
| 11182 | error: errorInfo.value, |
| 11183 | errorBoundary: boundary, |
| 11184 | componentStack: stack !== null ? stack : '', |
| 11185 | errorBoundaryName: null, |
| 11186 | errorBoundaryFound: false, |
| 11187 | willRetry: false |
| 11188 | }; |
| 11189 | |
| 11190 | if (boundary !== null) { |
| 11191 | capturedError.errorBoundaryName = getComponentName(boundary); |
| 11192 | capturedError.errorBoundaryFound = capturedError.willRetry = boundary.tag === ClassComponent; |
| 11193 | } else { |
| 11194 | capturedError.errorBoundaryName = null; |
| 11195 | capturedError.errorBoundaryFound = capturedError.willRetry = false; |
| 11196 | } |
| 11197 | |
| 11198 | try { |
| 11199 | logCapturedError(capturedError); |
| 11200 | } catch (e) { |
| 11201 | // Prevent cycle if logCapturedError() throws. |
| 11202 | // A cycle may still occur if logCapturedError renders a component that throws. |
| 11203 | var suppressLogging = e && e.suppressReactErrorLogging; |
| 11204 | if (!suppressLogging) { |
| 11205 | console.error(e); |
| 11206 | } |
| 11207 | } |
| 11208 | } |
| 11209 | |
| 11210 | var ReactFiberCommitWork = function (config, captureError, scheduleWork, computeExpirationForFiber, markLegacyErrorBoundaryAsFailed, recalculateCurrentTime) { |
| 11211 | var getPublicInstance = config.getPublicInstance, |
no test coverage detected