jon.recoil.org

Module Exn.Backend

Extensible backend-specific exceptions.

type t = ..
val show : bool Stdlib.ref

Controls the behaviour of pp.

val register_pp : (Stdlib.Format.formatter -> Eio.Exn.Backend.t -> bool) -> unit

register_pp pp adds pp as a pretty-printer of backend errors.

pp f err should format err using f, if possible. It should return true on success, or false if it didn't recognise err.

pp behaves like pp except that if display of backend errors has been turned off (with show) then it just prints a place-holder.

This is useful for formatting the backend-specific part of exceptions, which should be hidden in expect-style testing that needs to work on multiple backends.