Browse Source

Improved error metric as diagnostics might get reset between successive stages

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@7750 8c9fc860-2736-0410-a75d-ab315db34111
eth.negelef 7 years ago
parent
commit
46abd1d018
1 changed files with 3 additions and 3 deletions
  1. 3 3
      source/Release.Mod

+ 3 - 3
source/Release.Mod

@@ -3106,7 +3106,7 @@ BEGIN
 			IF (diagnostics.nofMessages > 0) THEN
 				diagnostics.ToStream(context.out, Diagnostics.All);
 			END;
-			IF (diagnostics.nofErrors > 0) THEN
+			IF error OR (diagnostics.nofErrors > 0) THEN
 				context.result := Commands.CommandError;
 			END;
 		ELSE
@@ -3235,7 +3235,7 @@ BEGIN
 				diagnostics.ToStream(context.out, Diagnostics.All);
 				context.out.Ln;
 			END;
-			IF (diagnostics.nofErrors > 0) THEN
+			IF error OR (diagnostics.nofErrors > 0) THEN
 				context.result := Commands.CommandError;
 			END;
 		ELSE
@@ -3370,7 +3370,7 @@ BEGIN
 				END;
 				context.out.Ln;
 			END;
-			IF (diagnostics.nofErrors > 0) THEN
+			IF error OR (diagnostics.nofErrors > 0) THEN
 				context.result := Commands.CommandError;
 			END;
 		ELSE