import * as tsplus_module_1 from "@effect/core/io/Effect/operations/fail";
import * as tsplus_module_2 from "@effect/core/io/Effect/operations/orElse";
/**
 * Executes this effect and returns its value, if it succeeds, but otherwise
 * fails with the specified error.
 *
 * @tsplus fluent ets/Effect orElseFail
 */

export function orElseFail_(self, e, __tsplusTrace) {
  return tsplus_module_2.orElse_(self, () => tsplus_module_1.fail(e, __tsplusTrace), __tsplusTrace);
}
/**
 * Executes this effect and returns its value, if it succeeds, but otherwise
 * fails with the specified error.
 *
 * @tsplus static ets/Effect/Aspects orElseFail
 */

export const orElseFail = (e, __tsplusTrace) => self => orElseFail_(self, e, __tsplusTrace);
//# sourceMappingURL=orElseFail.mjs.map