MCPcopy Create free account
hub / github.com/Effect-TS/effect / interruptCauseStack

Function interruptCauseStack

packages/effect/src/internal/effect.ts:432–441  ·  view source on GitHub ↗
(error: Error, interrupts: Array<Cause.Interrupt>)

Source from the content-addressed store, hash-verified

430}
431
432const 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
443const currentStackTrace = (frame: StackFrame): string => {
444 const out: Array<string> = []

Callers 1

causePrettyErrorsFunction · 0.85

Calls 4

currentStackTraceFunction · 0.85
pushMethod · 0.80
joinMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected