toplevel print_exn: proper setmp_thread_properties;
authorwenzelm
Thu, 03 Jan 2008 17:50:43 +0100
changeset 25809 decb98ff92dd
parent 25808 c7aaa3f6f0ac
child 25810 bac99880fa99
toplevel print_exn: proper setmp_thread_properties;
src/Pure/Isar/toplevel.ML
--- a/src/Pure/Isar/toplevel.ML	Thu Jan 03 17:50:42 2008 +0100
+++ b/src/Pure/Isar/toplevel.ML	Thu Jan 03 17:50:43 2008 +0100
@@ -295,9 +295,7 @@
 in
 
 fun exn_message exn = exn_msg (! debug) exn;
-
-fun print_exn NONE = ()
-  | print_exn (SOME (exn, s)) = Output.error_msg (cat_lines [exn_message exn, s]);
+fun print_exn (exn, s) = Output.error_msg (cat_lines [exn_message exn, s]);
 
 end;
 
@@ -770,7 +768,9 @@
     NONE => false
   | SOME (state', exn_info) =>
       (global_state := (state', exn_info);
-        print_exn exn_info;
+        (case exn_info of
+          NONE => ()
+        | SOME err => setmp_thread_properties tr print_exn err);
         true));
 
 fun >>> [] = ()