--- a/src/Pure/Tools/build.ML Sun Mar 29 12:11:02 2020 +0200
+++ b/src/Pure/Tools/build.ML Sun Mar 29 12:30:27 2020 +0200
@@ -219,6 +219,10 @@
if name = Context.PureN then Theory.install_pure (Thy_Info.get_theory Context.PureN) else ();
in () end;
+fun inline_errors exn =
+ Runtime.exn_message_list exn
+ |> List.app (fn msg => writeln ("\ferror_message = " ^ encode_lines (YXML.content_of msg)));
+
(*command-line tool*)
fun build args_file =
let
@@ -226,11 +230,10 @@
val _ = Options.load_default ();
val _ = Isabelle_Process.init_options ();
val args = decode_args (File.read (Path.explode args_file));
- fun error_message msg = writeln ("\ferror_message = " ^ encode_lines (YXML.content_of msg));
val _ =
Unsynchronized.setmp Private_Output.protocol_message_fn protocol_message
build_session args
- handle exn => (List.app error_message (Runtime.exn_message_list exn); Exn.reraise exn);
+ handle exn => (inline_errors exn; Exn.reraise exn);
val _ = Private_Output.protocol_message_fn := Output.protocol_message_undefined;
val _ = Options.reset_default ();
in () end;