package yocaml

  1. Overview
  2. Docs

Tools for building error diagnostics. These are essentially pretty-printers for exceptions propagated by the Yocaml.Eff module.

val exception_to_diagnostic : ?custom_error:(Format.formatter -> Data.Validation.custom_error -> unit) -> ?in_exception_handler:bool -> Format.formatter -> exn -> unit

A pretty printer that tries to return exceptions in the form of diagnostics (a string describing the error).

val runtime_error_to_diagnostic : Format.formatter -> string -> unit

Uses the same representation as an exception diagnostic to visually render an error message produced by the runtime.

OCaml

Innovation. Community. Security.