src/Pure/ML-Systems/exn_trace_polyml-5.5.1.ML
author wenzelm
Wed, 22 Jul 2015 23:26:00 +0200
changeset 60767 ad5b4771fc19
parent 59470 31d810570879
permissions -rw-r--r--
tuned proofs;

(*  Title:      Pure/ML-Systems/exn_trace_polyml-5.5.1.ML
    Author:     Makarius

Exception trace for Poly/ML 5.5.1 via ML output.
*)

fun print_exception_trace exn_message output e =
  PolyML.Exception.traceException
    (e, fn (trace, exn) =>
      let
        val title = "Exception trace - " ^ exn_message exn;
        val _ = output (String.concatWith "\n" (title :: trace));
      in reraise exn end);

PolyML.Compiler.reportExhaustiveHandlers := true;