tools: new ToolContext::check_errors
[nit.git] / src / nitc.nit
index 6a11696..2f544bd 100644 (file)
@@ -71,7 +71,7 @@ special AbstractCompiler
                        end
                        if clibdir == null then
                                error("Error: Cannot locate NIT C library directory. Uses --clibdir or envvar NIT_DIR.")
-                               exit(1)
+                               check_errors
                        end
                end
                bindir = opt_bindir.value
@@ -87,7 +87,7 @@ special AbstractCompiler
                        end
                        if bindir == null then
                                error("Error: Cannot locate NIT tools directory. Uses --bindir or envvar NIT_DIR.")
-                               exit(1)
+                               check_errors
                        end
                end
        end