module Exn: Generic_util_exn
Operations on/with exceptions.
exception Not_yet_implemented
Indicates a feature that is yet to be implemented.
exception Undefined
A function may raise Undefined
outside of its domain of definition.
exception Failed
val guard : bool -> unit
val only_if : ('a -> bool) -> 'a -> 'a
only_if f x
returns x
only if f x
is true.
Raises Failed
when f x
is false.
val one_of : 'a Lazy.t list -> 'a
one_of xs
tries each action of the list xs
in turn until one succeeds (meaning that it does not raise any exception).
Raises Failed
If the action list is empty or if all the actions raised an exception.