Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Errors handling
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.
Print a system error message then exits with code 1.
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