package octez-libs

  1. Overview
  2. Docs
A package that contains multiple base libraries used by the Octez suite

Install

Dune Dependency

Authors

Maintainers

Sources

octez-19.0.tar.gz
sha256=c6df840ebbf115e454db949028c595bec558a59a66cade73b52a6d099d6fa4d4
sha512=d8aee903b9fe130d73176bc8ec38b78c9ff65317da3cb4f3415f09af0c625b4384e7498201fdb61aa39086a7d5d409d0ab3423f9bc3ab989a680cf444a79bc13

doc/octez-libs.lwt-result-stdlib/Tezos_lwt_result_stdlib/Lwtreslib/Traced/Unit/index.html

Module Traced.Unit

type t = unit =
  1. | ()
val unit : t
val unit_s : t Lwt.t
val unit_e : (t, 'a) result
val unit_es : (t, 'a) result Lwt.t
val equal : t -> t -> bool
val compare : t -> t -> int
val to_string : t -> string
val catch : ?catch_only:(exn -> bool) -> (unit -> unit) -> unit

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.

val catch_f : ?catch_only:(exn -> bool) -> (unit -> unit) -> (exn -> unit) -> unit

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.

val catch_s : ?catch_only:(exn -> bool) -> (unit -> unit Lwt.t) -> unit Lwt.t

catch_s f is f (). If f () is rejected or raises an exception, then the exception is ignored and it resolves to ().

catch_only has the same behaviour and limitations as with catch.

OCaml

Innovation. Community. Security.