package async_log

  1. Overview
  2. Docs
Logging library built on top of Async_unix

Install

Dune Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=2dae248d74c23aa6a1e0bc38d5b34c975eb4dfbdf32f0970641b5befd8385720

doc/src/async_log.kernel/on_error.ml.html

Source file on_error.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
open! Core
open Async_kernel
open! Import

type t =
  [ `Raise
  | `Call of Error.t -> unit
  ]

let send_to_top_level_monitor =
  `Call
    (fun e ->
      let e =
        try Error.raise e with
        | e -> e
      in
      Monitor.send_exn Monitor.main ~backtrace:`Get e)
;;

let handle_error = function
  | `Raise -> raise
  | `Call f -> Fn.compose f Error.of_exn
;;
OCaml

Innovation. Community. Security.