Source file exn.ml

1
2
3
4
5
6
7
type t = exn

exception Negative_position of int

let check_position x = if x < 0 then Error (Negative_position x) else Ok x
let equal = ( = )
let pp ppf exn = Format.fprintf ppf "%s" (Printexc.to_string exn)