Hyperlinkv0.8.0-beta.28

Effect

Effect.withErrorReportingconsteffect/Effect.ts:4325
<
  Arg extends
    | Effect<any, any, any>
    | { readonly defectsOnly?: boolean | undefined }
    | undefined = { readonly defectsOnly?: boolean | undefined }
>(
  effectOrOptions: Arg,
  options?: { readonly defectsOnly?: boolean | undefined } | undefined
): [Arg] extends [Effect<infer _A, infer _E, infer _R>]
  ? Arg
  : <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>

Runs an effect and reports any errors to the configured ErrorReporters.

Details

If the defectsOnly option is set to true, only defects (unrecoverable errors) will be reported, while regular failures will be ignored.

error handling
Source effect/Effect.ts:43259 lines
export const withErrorReporting: <
  Arg extends Effect<any, any, any> | { readonly defectsOnly?: boolean | undefined } | undefined = {
    readonly defectsOnly?: boolean | undefined
  }
>(
  effectOrOptions: Arg,
  options?: { readonly defectsOnly?: boolean | undefined } | undefined
) => [Arg] extends [Effect<infer _A, infer _E, infer _R>] ? Arg : <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R> =
  internal.withErrorReporting