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