ZIO<R, E, A>.fromNullableOrFail constructor
ZIO<R, E, A>.fromNullableOrFail (
- A? a,
- E onNull()
Create a EIO from the given nullable value, succeeding when it is not
null, and failing with the result of onNull
when it is null.
Implementation
factory ZIO.fromNullableOrFail(A? a, E Function() onNull) =>
ZIO.fromOptionOrFail(Option.fromNullable(a), onNull);