package spotlib
Module Spotlib.Poly_resultSource
catch f runs f ~fail.
If f ~fail returns a value v then catch f returns `Ok v.
If f ~fail calls fail e, then the execution of the f ~fail immediately exists and catch f returns `Error e
Any exception raised in f ~fail is not caught.
catch_exn f runs f ().
If f () returns a value v then catch f returns `Ok v.
If an exception exn raised in f (), catch f returns `Error exn.