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

Method guard

packages/effect/src/encoding/Zip.ts:1286–1294  ·  view source on GitHub ↗
(f: () => A)

Source from the content-addressed store, hash-verified

1284 }
1285
1286 private guard<A>(f: () => A): A {
1287 if (this.failure !== undefined) throw this.failure
1288 try {
1289 return f()
1290 } catch (error) {
1291 if (isZipError(error)) this.failure = error
1292 throw error
1293 }
1294 }
1295
1296 private advance(): Header | undefined | typeof NeedInput {
1297 while (this.current !== undefined) {

Callers 2

nextMethod · 0.95
readMethod · 0.95

Calls 2

isZipErrorFunction · 0.85
fFunction · 0.50

Tested by

no test coverage detected