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

Function closeAndReportError

packages/effect/src/Stream.ts:12027–12033  ·  view source on GitHub ↗
(exit: Exit.Exit<unknown, unknown>)

Source from the content-addressed store, hash-verified

12025 return closePromise
12026 }
12027 const closeAndReportError = async (exit: Exit.Exit<unknown, unknown>): Promise<void> => {
12028 try {
12029 await close(exit)
12030 } catch (error) {
12031 await runPromise(Effect.logError("Suppressed error while closing Stream async iterator", error))
12032 }
12033 }
12034 // Register the fiber before pulling so a reentrant close can interrupt it.
12035 const pullChunk = Effect.withFiber((fiber) => {
12036 currentFiber = fiber

Callers 2

nextFunction · 0.85
throwFunction · 0.85

Calls 2

closeFunction · 0.70
runPromiseFunction · 0.70

Tested by

no test coverage detected