Commit 77c6c4d1 authored by jdelange's avatar jdelange

* ocarina/src/backends/ocarina-backends-po_hi_c-deployment.adb

   - Fix error when ports are not connected, print fatal error.



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@4705 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 987ce09e
......@@ -2445,12 +2445,35 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
S := AAN.First_Node (Global_Ports);
while Present (S) loop
A := Make_Array_Values;
if S = No_Node then
Display_Located_Error
(AAN.Loc (S),
"Port is not connected",
Fatal => True);
end if;
Port := AAN.Item (S);
if Port = No_Node then
Display_Located_Error
(AAN.Loc (Port),
"Port is not connected",
Fatal => True);
end if;
if Is_In (Port) and then
not AAU.Is_Empty (Sources (Port)) then
Port := Item (AAN.First_Node (Sources (Port)));
Lst := Sources (Port);
else
if AAU.Is_Empty (Destinations (Port)) then
Display_Located_Error
(AAN.Loc (Port),
"Port destination empty",
Fatal => True);
end if;
Port := Item (AAN.First_Node (Destinations (Port)));
Lst := Destinations (Port);
end if;
......@@ -2461,6 +2484,13 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
if not AAU.Is_Empty (Sources (Port2)) then
Port2 := Item (AAN.First_Node (Sources (Port2)));
else
if AAU.Is_Empty (Destinations (Port2)) then
Display_Located_Error
(AAN.Loc (Port2),
"Port destination empty",
Fatal => True);
end if;
Port2 := Item (AAN.First_Node (Destinations (Port2)));
end if;
......
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