package sexplib0

  1. Overview
  2. Docs
val add_auto : ?finalise:bool -> exn -> (exn -> Sexp.t) -> unit
  • deprecated [since 2016-07] use Conv.Exn_converter.add
val add : ?printexc:bool -> ?finalise:bool -> extension_constructor -> (exn -> Sexp.t) -> unit

add ?finalise constructor sexp_of_exn registers exception S-expression converter sexp_of_exn for exceptions with the given constructor.

NOTE: If finalise is true, then the exception will be automatically registered for removal with the GC (default). Finalisation will not work with exceptions that have been allocated outside the heap, which is the case for some standard ones e.g. Sys_error.

  • parameter finalise

    default = true

module For_unit_tests_only : sig ... end
OCaml

Innovation. Community. Security.