(boundary, errorInfo)
| 11315 | |
| 11316 | |
| 11317 | function logError(boundary, errorInfo) { |
| 11318 | var source = errorInfo.source; |
| 11319 | var stack = errorInfo.stack; |
| 11320 | if (stack === null) { |
| 11321 | stack = getStackAddendumByWorkInProgressFiber(source); |
| 11322 | } |
| 11323 | |
| 11324 | var capturedError = { |
| 11325 | componentName: source !== null ? getComponentName(source) : null, |
| 11326 | error: errorInfo.value, |
| 11327 | errorBoundary: boundary, |
| 11328 | componentStack: stack !== null ? stack : '', |
| 11329 | errorBoundaryName: null, |
| 11330 | errorBoundaryFound: false, |
| 11331 | willRetry: false |
| 11332 | }; |
| 11333 | |
| 11334 | if (boundary !== null) { |
| 11335 | capturedError.errorBoundaryName = getComponentName(boundary); |
| 11336 | capturedError.errorBoundaryFound = capturedError.willRetry = boundary.tag === ClassComponent; |
| 11337 | } else { |
| 11338 | capturedError.errorBoundaryName = null; |
| 11339 | capturedError.errorBoundaryFound = capturedError.willRetry = false; |
| 11340 | } |
| 11341 | |
| 11342 | try { |
| 11343 | logCapturedError(capturedError); |
| 11344 | } catch (e) { |
| 11345 | // Prevent cycle if logCapturedError() throws. |
| 11346 | // A cycle may still occur if logCapturedError renders a component that throws. |
| 11347 | var suppressLogging = e && e.suppressReactErrorLogging; |
| 11348 | if (!suppressLogging) { |
| 11349 | console.error(e); |
| 11350 | } |
| 11351 | } |
| 11352 | } |
| 11353 | |
| 11354 | var ReactFiberCommitWork = function (config, captureError, scheduleWork, computeExpirationForFiber, markLegacyErrorBoundaryAsFailed, recalculateCurrentTime) { |
| 11355 | var getPublicInstance = config.getPublicInstance, |
no test coverage detected