src/Pure/System/command_line.ML
changeset 52686 f4871fe80410
parent 51312 0ce544fbb509
child 54387 890e983cb07b
--- a/src/Pure/System/command_line.ML	Wed Jul 17 14:33:33 2013 +0200
+++ b/src/Pure/System/command_line.ML	Wed Jul 17 17:16:51 2013 +0200
@@ -17,7 +17,11 @@
   uninterruptible (fn restore_attributes => fn () =>
     let val rc =
       restore_attributes body () handle exn =>
-        (Output.error_msg (ML_Compiler.exn_message exn); if Exn.is_interrupt exn then 130 else 1);
+        let
+          val _ =
+            Output.error_msg (ML_Compiler.exn_message exn)
+              handle _ => Output.error_msg "Exception raised, but failed to print details!";
+        in if Exn.is_interrupt exn then 130 else 1 end;
     in if rc = 0 then () else exit rc end) ();
 
 fun tool0 body = tool (fn () => (body (); 0));