aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/grt/grt-errors.adb7
-rw-r--r--src/grt/grt-errors.ads4
-rw-r--r--src/grt/grt-main.adb4
3 files changed, 13 insertions, 2 deletions
diff --git a/src/grt/grt-errors.adb b/src/grt/grt-errors.adb
index 704132368..48cdd1870 100644
--- a/src/grt/grt-errors.adb
+++ b/src/grt/grt-errors.adb
@@ -202,6 +202,13 @@ package body Grt.Errors is
Error_E;
end Error;
+ procedure Error_NF (Str : String) is
+ begin
+ Error_S (Str);
+ Newline_Err;
+ Exit_Status := 1;
+ end Error_NF;
+
procedure Info_S (Str : String := "") is
begin
Put_Err (Progname);
diff --git a/src/grt/grt-errors.ads b/src/grt/grt-errors.ads
index f70a77764..371908fad 100644
--- a/src/grt/grt-errors.ads
+++ b/src/grt/grt-errors.ads
@@ -80,6 +80,10 @@ package Grt.Errors is
Line : Ghdl_I32);
pragma No_Return (Error);
+ -- Non-fatal error (for the final message in case of previous error).
+ -- Set the exit status.
+ procedure Error_NF (Str : String);
+
-- Warning message.
procedure Warning (Str : String);
diff --git a/src/grt/grt-main.adb b/src/grt/grt-main.adb
index e97b02eea..71b148467 100644
--- a/src/grt/grt-main.adb
+++ b/src/grt/grt-main.adb
@@ -180,11 +180,11 @@ package body Grt.Main is
if Expect_Failure then
if Status >= 0 then
Expect_Failure := False;
- Error ("error expected, but none occurred");
+ Error_NF ("error expected, but none occurred");
end if;
else
if Status < 0 then
- Error ("simulation failed");
+ Error_NF ("simulation failed");
end if;
end if;
end Run_Finish;