( error: Error, skipFrames: number, )
| 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. |
| 156 | export 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 | |
| 174 | export function parseStackTrace( |
| 175 | error: Error, |
no outgoing calls
no test coverage detected