mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-09 20:55:39 -05:00
10 lines
230 B
OCaml
10 lines
230 B
OCaml
module Fmt = CCFormat
|
|
|
|
exception Error of string
|
|
|
|
let () =
|
|
Printexc.register_printer (function
|
|
| Error msg -> Some ("internal error: " ^ msg)
|
|
| _ -> None)
|
|
|
|
let errorf msg = Fmt.ksprintf msg ~f:(fun s -> raise (Error s))
|