aboutsummaryrefslogtreecommitdiffstats
path: root/src/grt/grt-wave_opt-file.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-09-16 08:02:01 +0200
committerTristan Gingold <tgingold@free.fr>2018-09-16 08:02:01 +0200
commit7303c1068a75001365f77f2569382cc093fa9ac2 (patch)
treeadc0ec567e4c8405ba50ff4475924854369a0240 /src/grt/grt-wave_opt-file.adb
parenta03179ad2abff33d21fb5d18bcb13b2d8aa11c21 (diff)
downloadghdl-7303c1068a75001365f77f2569382cc093fa9ac2.tar.gz
ghdl-7303c1068a75001365f77f2569382cc093fa9ac2.tar.bz2
ghdl-7303c1068a75001365f77f2569382cc093fa9ac2.zip
grt: rework error API (WIP) - rework report, add warning.
Diffstat (limited to 'src/grt/grt-wave_opt-file.adb')
-rw-r--r--src/grt/grt-wave_opt-file.adb27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/grt/grt-wave_opt-file.adb b/src/grt/grt-wave_opt-file.adb
index 109dd98c7..32f70593a 100644
--- a/src/grt/grt-wave_opt-file.adb
+++ b/src/grt/grt-wave_opt-file.adb
@@ -125,15 +125,16 @@ package body Grt.Wave_Opt.File is
end loop;
if Version.Major = -1 then
- Report_C ("warning: version wasn't set at the beginning of the" &
+ Warning_S ("version wasn't set at the beginning of the" &
" file; currently supported version is ");
Print_Version (Current_Version);
- Report_E ("");
+ Warning_E;
end if;
if Tree_Is_Empty then
- Report_E ("No signal path was found in the wave option file," &
- " then every signals will be displayed.");
+ Warning_S ("No signal path was found in the wave option file," &
+ " then every signals will be displayed.");
+ Warning_E;
end if;
fclose (Stream);
@@ -211,9 +212,9 @@ package body Grt.Wave_Opt.File is
procedure Print_Version (Version : Version_Type) is
begin
- Report_C (Version.Major);
- Report_C (".");
- Report_C (Version.Minor);
+ Diag_C (Version.Major);
+ Diag_C ('.');
+ Diag_C (Version.Minor);
end Print_Version;
procedure Initialize_Tree is
@@ -305,9 +306,10 @@ package body Grt.Wave_Opt.File is
-- Then /top/a will supercede /top/a/b.
if not Tree_Updated and Tree_Cursor.Next_Child /= null then
Print_Context (Lineno, Line'First, Warning);
- Report_C ("supercedes line ");
- Report_C (Tree_Cursor.Lineno);
- Report_E (" and possibly more lines in between");
+ Diag_C ("supercedes line ");
+ Diag_C (Tree_Cursor.Lineno);
+ Diag_C (" and possibly more lines in between");
+ Warning_E;
-- TODO : destroy Tree_Cursor.Next_Child
Tree_Cursor.Lineno := Lineno;
Tree_Cursor.Next_Child := null;
@@ -358,8 +360,9 @@ package body Grt.Wave_Opt.File is
-- line. Then /top/a will supercede /top/a/b.
if Level > 1 and not Last_Updated then
Print_Context (Lineno, Elem_Expr'First, Warning);
- Report_C ("superceded by line ");
- Report_E (Cursor.Lineno);
+ Diag_C ("superceded by line ");
+ Diag_C (Cursor.Lineno);
+ Warning_E;
return;
-- TODO : destroy Created_Elem
end if;