diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-12-05 18:42:07 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-12-05 18:42:07 +0100 |
commit | 7457c219d5337e56c9da8d36b013294d93cb2ee5 (patch) | |
tree | 6bf834a4b0f1b1424bf6f053a6f1282a2ffbe065 /src/vhdl/errorout.adb | |
parent | 7ca1ebe6130e10414162c15c3e85665ca4e1793c (diff) | |
download | ghdl-7457c219d5337e56c9da8d36b013294d93cb2ee5.tar.gz ghdl-7457c219d5337e56c9da8d36b013294d93cb2ee5.tar.bz2 ghdl-7457c219d5337e56c9da8d36b013294d93cb2ee5.zip |
Errorout: use Logging instead of Text_IO.
Diffstat (limited to 'src/vhdl/errorout.adb')
-rw-r--r-- | src/vhdl/errorout.adb | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/src/vhdl/errorout.adb b/src/vhdl/errorout.adb index 24b0f5493..cdeb28ee4 100644 --- a/src/vhdl/errorout.adb +++ b/src/vhdl/errorout.adb @@ -16,7 +16,7 @@ -- Software Foundation, 59 Temple Place - Suite 330, Boston, MA -- 02111-1307, USA. -with Ada.Text_IO; +with Logging; use Logging; with Scanner; with Name_Table; with Iirs_Utils; use Iirs_Utils; @@ -28,35 +28,26 @@ with PSL.Nodes; with Str_Table; package body Errorout is - procedure Error_Kind (Msg : String; An_Iir : Iir) - is - use Ada.Text_IO; + procedure Error_Kind (Msg : String; An_Iir : Iir) is begin - Put_Line - (Standard_Error, - Msg & ": cannot handle " & Iir_Kind'Image (Get_Kind (An_Iir)) + Log_Line + (Msg & ": cannot handle " & Iir_Kind'Image (Get_Kind (An_Iir)) & " (" & Disp_Location (An_Iir) & ')'); raise Internal_Error; end Error_Kind; - procedure Error_Kind (Msg : String; Def : Iir_Predefined_Functions) - is - use Ada.Text_IO; + procedure Error_Kind (Msg : String; Def : Iir_Predefined_Functions) is begin - Put_Line - (Standard_Error, - Msg & ": cannot handle " & Iir_Predefined_Functions'Image (Def)); + Log_Line + (Msg & ": cannot handle " & Iir_Predefined_Functions'Image (Def)); raise Internal_Error; end Error_Kind; - procedure Error_Kind (Msg : String; N : PSL_Node) - is - use Ada.Text_IO; + procedure Error_Kind (Msg : String; N : PSL_Node) is begin - Put (Standard_Error, Msg); - Put (Standard_Error, ": cannot handle "); - Put_Line (Standard_Error, - PSL.Nodes.Nkind'Image (PSL.Nodes.Get_Kind (N))); + Log (Msg); + Log (": cannot handle "); + Log_Line (PSL.Nodes.Nkind'Image (PSL.Nodes.Get_Kind (N))); raise Internal_Error; end Error_Kind; @@ -591,11 +582,10 @@ package body Errorout is -- Disp a bug message. procedure Error_Internal (Expr: in Iir; Msg: String := "") is - use Ada.Text_IO; pragma Unreferenced (Expr); begin - Put (Standard_Error, "internal error: "); - Put_Line (Standard_Error, Msg); + Log ("internal error: "); + Log_Line (Msg); raise Internal_Error; end Error_Internal; |