MCPcopy Index your code
hub / github.com/react/react / parseStackTracePrivate

Function parseStackTracePrivate

packages/react-server/src/ReactFlightStackConfigV8.js:156–172  ·  view source on GitHub ↗
(
  error: Error,
  skipFrames: number,
)

Source from the content-addressed store, hash-verified

154// This version is only used when React fully owns the Error object and there's no risk of it having
155// been already initialized and no risky that anyone else will initialize it later.
156export function parseStackTracePrivate(
157 error: Error,
158 skipFrames: number,
159): null | ReactStackTrace {
160 collectedStackTrace = null;
161 framesToSkip = skipFrames;
162 const previousPrepare = Error.prepareStackTrace;
163 Error.prepareStackTrace = collectStackTracePrivate;
164 try {
165 if (error.stack !== '') {
166 return null;
167 }
168 } finally {
169 Error.prepareStackTrace = previousPrepare;
170 }
171 return collectedStackTrace;
172}
173
174export function parseStackTrace(
175 error: Error,

Callers 2

wrapperMethodFunction · 0.85
initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected