Make regen work even when someone has compilation errors
[hcoop/domtool2.git] / src / main.sml
index e106823..4e377a9 100644 (file)
@@ -796,10 +796,6 @@ fun regenerate context =
        val _ = ErrorMsg.reset ()
 
        val b = basis ()
-       val _ = if Env.lookupType b "string" then
-                   print "Still got it\n"
-               else
-                   print "Don't got it\n"
        val () = Tycheck.disallowExterns ()
 
        val () = Domain.resetGlobal ()
@@ -852,13 +848,15 @@ fun regenerate context =
                val (_, files) = Order.order (SOME b) files
            in
                if !ErrorMsg.anyErrors then
-                   print ("User " ^ user ^ "'s configuration has errors!\n")
+                   (ErrorMsg.reset ();
+                    print ("User " ^ user ^ "'s configuration has errors!\n"))
                else
                    app eval' files
            end
                handle IO.Io _ => ()
                     | OS.SysErr (s, _) => print ("System error processing user " ^ user ^ ": " ^ s ^ "\n")
-                    | ErrorMsg.Error => print ("User " ^ user ^ " had a compilation error.\n")
+                    | ErrorMsg.Error => (ErrorMsg.reset ();
+                                         print ("User " ^ user ^ " had a compilation error.\n"))
                     | _ => print "Unknown exception during regeneration!\n"
     in
        app contactNode Config.nodeIps;