import * as tsplus_module_1 from "@effect/core/io/Layer/operations/succeedEnvironment";
import * as tsplus_module_2 from "@effect/core/io/Layer/operations/foldLayer";
/**
 * Recovers from all errors.
 *
 * @tsplus fluent ets/Layer catchAll
 */

export function catchAll_(self, handler) {
  return tsplus_module_2.foldLayer_(self, handler, env => tsplus_module_1.succeedEnvironment(() => env));
}
/**
 * Recovers from all errors.
 *
 * @tsplus static ets/Layer/Aspects catchAll
 */

export const catchAll = handler => self => catchAll_(self, handler);
//# sourceMappingURL=catchAll.mjs.map