Yocaml.DiagnosticSourceTools 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 ->
unitA pretty printer that tries to return exceptions in the form of diagnostics (a string describing the error).
Uses the same representation as an exception diagnostic to visually render an error message produced by the runtime.