signature MLTON_EXN = sig val addExnMessager: (exn -> string option) -> unit val history: exn -> string list val topLevelHandler: exn -> 'a end
-
addExnMessager f
-
history e
-
topLevelHandler e
-
adds f as a pretty-printer to be used by General.exnMessage for converting exceptions to strings. Messagers are tried in order from most recently added to least recently added.
-
returns call stack at the point that e was first raised. Each element of the list is a file position. The elements are in reverse chronological order, i.e. the function called last is at the front of the list.
history e will return [] unless the program is compiled with -const 'Exn.keepHistory true'.
-
behaves as if the top level handler received the exception e, that is, print out the unhandled exception message for e and exit.