Package: effect
Module: Exit
Checks whether a failed Exit contains defects (Die reasons).
When to use
Use to check whether an Exit failure cause contains unexpected errors.
Details
Returns false for successful exits. Only checks for Die reasons in the
Cause. A Cause with only Fail or Interrupt reasons returns false.
Example (Checking for defects)
import { Exit } from "effect"
console.log(Exit.hasDies(Exit.die(new Error("bug")))) // true
console.log(Exit.hasDies(Exit.fail("err"))) // false
console.log(Exit.hasDies(Exit.succeed(42))) // false
See
hasFails to check for typed errorshasInterrupts to check for interruptionsSignature
declare const hasDies: <A, E>(self: Exit<A, E>) => self is Failure<A, E>
Since v4.0.0