From 6e7dd47d214ca2c5422ed9f6436290c40ffb3f4b Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Tue, 6 Oct 2015 14:52:36 -0400 Subject: [PATCH] nitc: print errors if all modules are invalid Signed-off-by: Jean Privat --- src/compiler/abstract_compiler.nit | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/compiler/abstract_compiler.nit b/src/compiler/abstract_compiler.nit index a1827d0..3d6d939 100644 --- a/src/compiler/abstract_compiler.nit +++ b/src/compiler/abstract_compiler.nit @@ -3870,7 +3870,12 @@ end # Here we load an process all modules passed on the command line var mmodules = modelbuilder.parse(arguments) -if mmodules.is_empty then return +if mmodules.is_empty then + toolcontext.check_errors + toolcontext.errors_info + if toolcontext.error_count > 0 then exit(1) else exit(0) +end + modelbuilder.run_phases for mmodule in mmodules do -- 1.7.9.5