When a service computes a value:
- the computation can succeed, if which case the computed value is
returned
- or the computation can fail with an exception, in which a
failed future can be returned instead
{Value.byNeedFail E ?V}
- creates a failed future
V
- whenever a thread synchronizes on
V
, exception
E
is raised
Typical usage:
try Expr catch E then {Value.byNeedFail E} end