MCPcopy
hub / github.com/facebook/react / getThrownInfo

Function getThrownInfo

packages/react-server/src/ReactFizzServer.js:1150–1167  ·  view source on GitHub ↗
(node: null | ComponentStackNode)

Source from the content-addressed store, hash-verified

1148export type PostponeInfo = ThrownInfo;
1149
1150function getThrownInfo(node: null | ComponentStackNode): ThrownInfo {
1151 const errorInfo: ThrownInfo = {};
1152 if (node) {
1153 Object.defineProperty(errorInfo, 'componentStack', {
1154 configurable: true,
1155 enumerable: true,
1156 get() {
1157 // Lazyily generate the stack since it's expensive.
1158 const stack = getStackFromNode(node);
1159 Object.defineProperty(errorInfo, 'componentStack', {
1160 value: stack,
1161 });
1162 return stack;
1163 },
1164 });
1165 }
1166 return errorInfo;
1167}
1168
1169function encodeErrorForBoundary(
1170 boundary: SuspenseBoundary,

Callers 8

renderSuspenseBoundaryFunction · 0.85
replaySuspenseBoundaryFunction · 0.85
replayElementFunction · 0.85
replayFragmentFunction · 0.85
renderNodeFunction · 0.85
abortTaskFunction · 0.85
retryRenderTaskFunction · 0.85
retryReplayTaskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected