src/Pure/ML/exn_trace_polyml-5.5.1.ML
author wenzelm
Mon, 21 Jul 2014 16:58:12 +0200
changeset 57593 2f7d91242b99
parent 56283 20cf88cd3188
child 59055 5a7157b8e870
permissions -rw-r--r--
proper Swing buttons instead of active areas within text (by Lars Hupel);

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

Exception trace for Poly/ML 5.5.1, using regular Isabelle output.
*)

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

PolyML.Compiler.reportExhaustiveHandlers := true;