Commit d2a31d16 authored by yoogx's avatar yoogx

* Clarify error message in case of the instantiation of a

          (event) data port without full type attached.
parent baf7e1e2
......@@ -315,7 +315,7 @@ package body Ocarina.Instances.Components.Features is
-- Abort the instantiation of the corresponding entity if there
-- is no such corresponding entity.
Display_Instantiation_Error (Feature, Fatal => False);
Display_Type_Instantiation_Error (Feature, Fatal => False);
return No_Node;
else
C := ATE.Get_Referenced_Entity (Entity_Ref (Feature));
......
......@@ -88,4 +88,21 @@ package body Ocarina.Instances.Messages is
Exit_On_Error (Fatal, "Cannot instantiate full model, exit now");
end Display_Instantiation_Error;
procedure Display_Type_Instantiation_Error
(Node : Node_Id; Fatal : Boolean := True)
is
pragma Assert (Present (Node));
Error_Msg : constant String
:= "% (feature) cannot be properly instantiated: requires full type";
begin
Error_Loc (1) := Loc (Node);
Error_Name (1) := Get_Name_Of_Entity (Node);
if Fatal then
DE (Error_Msg);
else
DW (Error_Msg);
end if;
Exit_On_Error (Fatal, "Cannot instantiate full model, exit now");
end Display_Type_Instantiation_Error;
end Ocarina.Instances.Messages;
......@@ -34,8 +34,13 @@
package Ocarina.Instances.Messages is
procedure Display_No_Entity_Ref (Node : Node_Id);
procedure Display_Entity_Is_A_Component_Type (Node : Node_Id);
procedure Display_Instantiation_Error
(Node : Node_Id; Fatal : Boolean := True);
procedure Display_Type_Instantiation_Error
(Node : Node_Id; Fatal : Boolean := True);
end Ocarina.Instances.Messages;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment