Package: effect
Module: Exit
Creates a failed Exit from a typed error value.
When to use
Use when you need to represent an expected typed failure as an Exit.
Details
The error is wrapped in a Cause.Fail internally.
Returns a Failure<never, E>.
Example (Creating a failed Exit)
import { Exit } from "effect"
const exit = Exit.fail("Something went wrong")
console.log(Exit.isFailure(exit)) // true
See
succeed to create a successful Exitdie to create a Failure from an unexpected defectfailCause to create a Failure from a full CauseSignature
declare const fail: <E>(e: E) => Exit<never, E>
Since v2.0.0