aboutsummaryrefslogtreecommitdiffstats
path: root/src/ghdldrv/ghdllocal.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-11-30 21:13:03 +0100
committerTristan Gingold <tgingold@free.fr>2017-12-01 04:35:16 +0100
commitb5f86659f859eac6a9e13a15387ec245f04bf968 (patch)
treeb297eb1abe590bb7a3da2bce4210521152895ddd /src/ghdldrv/ghdllocal.adb
parent2cfea420b530e95be0442acbdce523b22055fe8b (diff)
downloadghdl-b5f86659f859eac6a9e13a15387ec245f04bf968.tar.gz
ghdl-b5f86659f859eac6a9e13a15387ec245f04bf968.tar.bz2
ghdl-b5f86659f859eac6a9e13a15387ec245f04bf968.zip
ghdl -i: stop on error.
Fix #474
Diffstat (limited to 'src/ghdldrv/ghdllocal.adb')
-rw-r--r--src/ghdldrv/ghdllocal.adb8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb
index ff3531c27..cf708d288 100644
--- a/src/ghdldrv/ghdllocal.adb
+++ b/src/ghdldrv/ghdllocal.adb
@@ -680,6 +680,8 @@ package body Ghdllocal is
procedure Perform_Action (Cmd : in out Command_Import; Args : Argument_List)
is
pragma Unreferenced (Cmd);
+ use Errorout;
+
Id : Name_Id;
Design_File : Iir_Design_File;
Unit : Iir;
@@ -711,6 +713,10 @@ package body Ghdllocal is
end if;
end loop;
+ if Nbr_Errors > 0 then
+ raise Compilation_Error;
+ end if;
+
-- Analyze all files.
if False then
Design_File := Get_Design_File_Chain (Libraries.Work_Library);
@@ -734,7 +740,7 @@ package body Ghdllocal is
Libraries.Save_Work_Library;
exception
- when Errorout.Compilation_Error =>
+ when Compilation_Error =>
Error ("importation has failed due to compilation error");
raise;
end Perform_Action;