package octez-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=dbc3b675aee59c2c574e5d0a771193a2ecfca31e7a5bc5aed66598080596ce1c
sha512=b97ed762b9d24744305c358af0d20f394376b64bfdd758dd4a81775326caf445caa57c4f6445da3dd6468ff492de18e4c14af6f374dfcbb7e4d64b7b720e5e2a
doc/octez-libs.lwt-result-stdlib/Tezos_lwt_result_stdlib/Lwtreslib/Traced/Unit/index.html
Module Traced.Unit
val unit : t
val to_string : t -> string
catch f
is f ()
, but exceptions are ignored and ()
is returned if one is raised.
You should only use catch
when you truly do not care about what exception may be raised during the evaluation of f ()
. If you need to inspect the raised exception consider catch_f
and if you need to pass it along consider Result.catch
.
If catch_only
is set, then only exceptions e
such that catch_only e
is true
are caught.
Whether catch_only
is set or not, this function never catches non-deterministic runtime exceptions of OCaml such as Stack_overflow
and Out_of_memory
.
catch_f f handler
is f ()
. If f ()
raises an exception then handler
is called.
No attempt is made to catch the exceptions raised by handler
.
catch_only
has the same behaviour and limitations as with catch
.