aboutsummaryrefslogtreecommitdiffstats
path: root/src/ghdldrv/ghdllocal.adb
diff options
context:
space:
mode:
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;