package unix-errno

  1. Overview
  2. Docs
Unix errno types, maps, and support

Install

Dune Dependency

Authors

Maintainers

Sources

unix-errno-0.6.0.tbz
sha256=044d962f1169a9357c7913966b58a07f095a670676b6fae0b85cdb6b11c03584
sha512=2c6c8d76bafe169b7921c53a3e734bc4fd0c91af13a2670d0ea1eda3f9f6d3237795b1d16b0a1c812209834f2f868ff13adfcc50afc0eb59ea3ea640547121cb

doc/unix-errno.unix/Errno_unix/index.html

Module Errno_unixSource

host is the bidirectional error number map for the host upon which this code is executing.

Sourceval to_unix : ?host:Errno.Host.t -> Errno.t -> Unix.error option

to_unix ?host errno is the Unix.error corresponding to errno if one exists. If host is not supplied, host will be used.

Sourceval of_unix : ?host:Errno.Host.t -> Unix.error -> Errno.t list

of_unix ?host error is the list of symbolic error numbers corresponding to the Unix.error, error. If host is not supplied, host will be used.

Sourceval get_errno : unit -> Signed.sint

get_errno () returns the current value of the C errno thread-local variable.

Sourceval reset_errno : unit -> unit

reset_errno () sets the current value of the C errno thread-local variable to 0.

Sourceval raise_errno : ?call:string -> ?label:string -> Signed.sint -> 'a

raise_errno ?call ?label errno raises Errno.Error after converting errno to the appropriate variants via host. call and label default to the empty string.

Sourceval raise_on_errno : ?call:string -> ?label:string -> (unit -> 'a option) -> 'a

raise_on_errno ?call ?label fn raises Errno.Error using the code in the C errno variable if fn returns None. call and label default to the empty string.

Sourceval to_errno_exn : exn -> exn

to_errno_exn exn converts exn into an Errno.Error if it is a Unix.Unix_error and otherwise does not modify it.

Sourceval with_errno_exn : (unit -> 'a) -> 'a

with_errno_exn fn raises Errno.Error instead of Unix.Unix_error if fn raises the latter.

Sourceval to_unix_exn : exn -> exn

to_unix_exn exn converts exn into a Unix.Unix_error if it is an Errno.Error and an errno code exists on the present host. Otherwise, to_unix_exn does not modify exn.

Sourceval with_unix_exn : (unit -> 'a) -> 'a

with_unix_exn fn raises Unix.Unix_error instead of Errno.Error if fn raises the latter and an errno code exists on the present host.

OCaml

Innovation. Community. Security.