import * as tsplus_module_1 from "@effect/core/io/Effect/operations/failNow";
import * as tsplus_module_2 from "@effect/core/io/Effect/operations/unrefineWith";
import * as tsplus_module_3 from "@effect/core/io/Effect/operations/catchAll";
/**
 * Recovers from some or all of the defects with provided partial function.
 *
 * **WARNING**: There is no sensible way to recover from defects. This
 * method should be used only at the boundary between Effect and an external
 * system, to transmit information on a defect for diagnostic or explanatory
 * purposes.
 *
 * @tsplus fluent ets/Effect catchSomeDefect
 */

export function catchSomeDefect_(self, pf, __tsplusTrace) {
  return tsplus_module_3.catchAll_(tsplus_module_2.unrefineWith_(self, pf, tsplus_module_1.failNow, __tsplusTrace), s => s, __tsplusTrace);
}
/**
 * Recovers from some or all of the defects with provided partial function.
 *
 * **WARNING**: There is no sensible way to recover from defects. This
 * method should be used only at the boundary between Effect and an external
 * system, to transmit information on a defect for diagnostic or explanatory
 * purposes.
 *
 * @tsplus static ets/Effect/Aspects catchSomeDefect
 */

export const catchSomeDefect = (pf, __tsplusTrace) => self => catchSomeDefect_(self, pf, __tsplusTrace);
//# sourceMappingURL=catchSomeDefect.mjs.map