ML_Compiler.eval: discontinued extra "Static Errors" of raw Poly/ML;
authorwenzelm
Wed, 08 Sep 2010 23:52:24 +0200
changeset 39230 184507f6e8d0
parent 39229 6530e87186c9
child 39231 25c345302a17
ML_Compiler.eval: discontinued extra "Static Errors" of raw Poly/ML;
src/Pure/ML/ml_compiler_polyml-5.3.ML
--- a/src/Pure/ML/ml_compiler_polyml-5.3.ML	Wed Sep 08 23:40:48 2010 +0200
+++ b/src/Pure/ML/ml_compiler_polyml-5.3.ML	Wed Sep 08 23:52:24 2010 +0200
@@ -158,12 +158,14 @@
         List.app apply_val values
       end;
 
+    exception Static_Errors of unit;
+
     fun result_fun (phase1, phase2) () =
      ((case phase1 of
         NONE => ()
       | SOME parse_tree => report_parse_tree depth space parse_tree);
       (case phase2 of
-        NONE => error "Static Errors"
+        NONE => raise Static_Errors ()
       | SOME code =>
           apply_result
             ((code
@@ -188,7 +190,8 @@
       handle exn =>
        (output_warnings ();
         output_writeln ();
-        raise_error ("Exception- " ^ General.exnMessage exn ^ " raised"));
+        (case exn of Static_Errors () => raise_error ""
+        | _ => raise_error ("Exception- " ^ General.exnMessage exn ^ " raised")));
   in
     if verbose then (output_warnings (); flush_error (); output_writeln ())
     else ()