package oxbow

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file exceptions.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
exception Unavailable

let unavailable () = raise Unavailable

let guard name f =
  try f () with
  | Unavailable as e -> raise e
  | Eio.Cancel.Cancelled _ as e -> raise e
  | exn ->
    Log.err
    @@ fun m ->
    m "%s raised: %s@.%s" name (Printexc.to_string exn) (Printexc.get_backtrace ())
;;