8 val addExnMessager: (exn -> string option) -> unit
9 val history: exn -> string list
11 val defaultTopLevelHandler: exn -> 'a
12 val getTopLevelHandler: unit -> (exn -> unit)
13 val setTopLevelHandler: (exn -> unit) -> unit
14 val topLevelHandler: exn -> 'a
20 adds `f` as a pretty-printer to be used by `General.exnMessage` for
21 converting exceptions to strings. Messagers are tried in order from
22 most recently added to least recently added.
26 returns call stack at the point that `e` was first raised. Each
27 element of the list is a file position. The elements are in reverse
28 chronological order, i.e. the function called last is at the front of
31 `history e` will return `[]` unless the program is compiled with
32 `-const 'Exn.keepHistory true'`.
34 * `defaultTopLevelHandler e`
36 function that behaves as the default top level handler; that is, print
37 out the unhandled exception message for `e` and exit.
39 * `getTopLevelHandler ()`
41 get the top level handler.
43 * `setTopLevelHandler f`
45 set the top level handler to the function `f`. The function `f`
46 should not raise an exception or return normally.
50 behaves as if the top level handler received the exception `e`.