[Ada] Better exception message on Invalid_Switch exception

Improve the error message introduced in the recent commit for
Invalid_Switch exception.

2019-08-13  Dmitriy Anisimkov  <anisimko@adacore.com>

gcc/ada/

	* libgnat/g-comlin.adb (Getopt): Quote unrecognized switch in
	Invalid_Switch exception message.

From-SVN: r274333
This commit is contained in:
Dmitriy Anisimkov 2019-08-13 08:06:24 +00:00 committed by Pierre-Marie de Rodat
parent 96cdd379c3
commit e0401824f7
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2019-08-13 Dmitriy Anisimkov <anisimko@adacore.com>
* libgnat/g-comlin.adb (Getopt): Quote unrecognized switch in
Invalid_Switch exception message.
2019-08-13 Yannick Moy <moy@adacore.com>
* sem_util.adb (Traverse_More_Func): Take into account

View File

@ -754,7 +754,7 @@ package body GNAT.Command_Line is
Parser.Current_Index := End_Index + 1;
raise Invalid_Switch with
"Unrecognized option " & Full_Switch (Parser);
"Unrecognized option '" & Full_Switch (Parser) & ''';
end if;
End_Index := Parser.Current_Index + Max_Length - 1;
@ -885,7 +885,7 @@ package body GNAT.Command_Line is
Extra => Parser.Switch_Character);
Parser.Current_Index := Arg'Last + 1;
raise Invalid_Switch with
"Unrecognized option " & Full_Switch (Parser);
"Unrecognized option '" & Full_Switch (Parser) & ''';
end if;
end case;