(error: Error, interrupts: Array<Cause.Interrupt>)
| 430 | } |
| 431 | |
| 432 | const interruptCauseStack = (error: Error, interrupts: Array<Cause.Interrupt>): string => { |
| 433 | const out: Array<string> = [`${error.name}: ${error.message}`] |
| 434 | for (const current of interrupts) { |
| 435 | const fiberId = current.fiberId !== undefined ? `#${current.fiberId}` : "unknown" |
| 436 | const frame = current.annotations.get(InterruptorStackTrace.key) as StackFrame | undefined |
| 437 | out.push(` at fiber (${fiberId})`) |
| 438 | if (frame) out.push(currentStackTrace(frame)) |
| 439 | } |
| 440 | return out.join("\n") |
| 441 | } |
| 442 | |
| 443 | const currentStackTrace = (frame: StackFrame): string => { |
| 444 | const out: Array<string> = [] |
no test coverage detected