MCPcopy Create free account
hub / github.com/Snowflyt/tinyeffect / catch

Method catch

src/effected.ts:1052–1054  ·  view source on GitHub ↗
(name: string, handler: (message?: string) => unknown)

Source from the content-addressed store, hash-verified

1050 handler: (message?: string) => T,
1051 ): Effected<ExcludeEffect<E, Effect.Error<Name>>, R | T>;
1052 catch(name: string, handler: (message?: string) => unknown): Effected<Effect, unknown> {
1053 return this.terminate(`error:${name}` as never, handler as never);
1054 }
1055
1056 /**
1057 * Catch all error effects with a handler.

Callers 1

catchAndThrowMethod · 0.95

Calls 1

terminateMethod · 0.95

Tested by

no test coverage detected