Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
kazoo
Commits
74df9aa8
Commit
74df9aa8
authored
Aug 06, 2019
by
Maxime Perrotin
Browse files
Shield against dataview instantiation error
parent
c5b1c0b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/taste-data_view.adb
View file @
74df9aa8
...
...
@@ -23,7 +23,6 @@ package body TASTE.Data_View is
use
Locations
,
Ocarina
.
Instances
.
Queries
,
Ocarina
.
Namet
,
-- Ocarina.Analyzer,
Ocarina
.
Backends
.
Properties
,
Ocarina
.
Options
,
Ocarina
.
Instances
,
...
...
@@ -64,11 +63,22 @@ package body TASTE.Data_View is
Get_String_Name
(
"taste_dataview.others"
);
if
DV_Root
/=
No_Node
then
System
:=
Root_System
(
Instantiate_Model
(
Root
=>
DV_Root
));
declare
Inst
:
constant
Node_Id
:=
Instantiate_Model
(
Root
=>
DV_Root
,
Exit_If_Error
=>
False
);
begin
if
Inst
/=
No_Node
then
System
:=
Root_System
(
Instantiate_Model
(
Root
=>
DV_Root
));
else
System
:=
No_Node
;
end
if
;
end
;
end
if
;
if
No
(
System
)
then
raise
Data_View_Error
with
"Could not instantiate Data View"
;
raise
Data_View_Error
with
"Could not instantiate Data View - Try taste-update-data-view"
;
end
if
;
Current_Type
:=
AIN
.
First_Node
(
AIN
.
Subcomponents
(
System
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment