package dedukti

  1. Overview
  2. Docs

Errors handling

val color : bool Stdlib.ref

Flag to disable colored output.

val success : string -> unit

Print a success message.

val fail_exit : file:string -> code:string -> Kernel.Basic.loc option -> ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a

fail_exit file error_id lc "..." Prints the given error message prefixed with module and location details (when provided) as well as the error ID then exits with the given code.

val fail_sys_error : ?file:string -> msg:string -> unit -> 'a

Print a system error message then exits with code 1.

type error_code = int
type error_msg = error_code * Kernel.Basic.loc option * string
type error_handler = red:(Kernel.Term.term -> Kernel.Term.term) -> exn -> error_msg option
val register_exception : (red:(Kernel.Term.term -> Kernel.Term.term) -> exn -> error_msg option) -> unit
val string_of_exception : red:(Kernel.Term.term -> Kernel.Term.term) -> Kernel.Basic.loc -> exn -> error_code * Kernel.Basic.loc * string
OCaml

Innovation. Community. Security.