From e0401824f74645adcd008045190e0d86ae3ce8e0 Mon Sep 17 00:00:00 2001 From: Dmitriy Anisimkov Date: Tue, 13 Aug 2019 08:06:24 +0000 Subject: [PATCH] [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 gcc/ada/ * libgnat/g-comlin.adb (Getopt): Quote unrecognized switch in Invalid_Switch exception message. From-SVN: r274333 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/libgnat/g-comlin.adb | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 5b88950ace1..eab24a04a5c 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2019-08-13 Dmitriy Anisimkov + + * libgnat/g-comlin.adb (Getopt): Quote unrecognized switch in + Invalid_Switch exception message. + 2019-08-13 Yannick Moy * sem_util.adb (Traverse_More_Func): Take into account diff --git a/gcc/ada/libgnat/g-comlin.adb b/gcc/ada/libgnat/g-comlin.adb index f567ddb2481..e3fac5bc82f 100644 --- a/gcc/ada/libgnat/g-comlin.adb +++ b/gcc/ada/libgnat/g-comlin.adb @@ -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; -- 2.30.2