diff options
author | gingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7> | 2012-12-11 02:32:56 +0000 |
---|---|---|
committer | gingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7> | 2012-12-11 02:32:56 +0000 |
commit | 92d0ab4e50abbf6048d6e70e2e34a93bae2b5f9e (patch) | |
tree | 0bfb9c55f8f39ed9d557b6e2bc9f259f7d1d65a0 /errorout.adb | |
parent | 977737c9166d3c69894f30af940029a8364c74fc (diff) | |
download | ghdl-92d0ab4e50abbf6048d6e70e2e34a93bae2b5f9e.tar.gz ghdl-92d0ab4e50abbf6048d6e70e2e34a93bae2b5f9e.tar.bz2 ghdl-92d0ab4e50abbf6048d6e70e2e34a93bae2b5f9e.zip |
Improve error message when a filename is used instead of a unit name
Diffstat (limited to 'errorout.adb')
-rw-r--r-- | errorout.adb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/errorout.adb b/errorout.adb index 3332de2ab..9b2e4a687 100644 --- a/errorout.adb +++ b/errorout.adb @@ -86,14 +86,16 @@ package body Errorout is raise Internal_Error; end Error_Kind; - -- Disp an error, prepended with program name. - -- This is used for errors before initialisation, such as bad option or - -- bad filename. - procedure Error_Msg_Option (Msg: String) is + procedure Error_Msg_Option_NR (Msg: String) is begin Put (Ada.Command_Line.Command_Name); - Put (":*command-line*: "); + Put (": "); Put_Line (Msg); + end Error_Msg_Option_NR; + + procedure Error_Msg_Option (Msg: String) is + begin + Error_Msg_Option_NR (Msg); raise Option_Error; end Error_Msg_Option; |