(error: Error, stack: CallSite[])
| 409 | } |
| 410 | |
| 411 | function prepareStackTrace(error: Error, stack: CallSite[]) { |
| 412 | const name = error.name || 'Error' |
| 413 | const message = error.message || '' |
| 414 | const errorString = `${name}: ${message}` |
| 415 | |
| 416 | const state = { nextPosition: null, curPosition: null } |
| 417 | const processedStack = [] |
| 418 | for (let i = stack.length - 1; i >= 0; i--) { |
| 419 | processedStack.push(`\n at ${wrapCallSite(stack[i], state)}`) |
| 420 | state.nextPosition = state.curPosition |
| 421 | } |
| 422 | state.curPosition = state.nextPosition = null |
| 423 | return errorString + processedStack.reverse().join('') |
| 424 | } |
nothing calls this directly
no test coverage detected