s-wchstw.adb: provide messages for run time unit exceptions
authorRobert Dewar <dewar@adacore.com>
Wed, 26 Sep 2007 10:46:59 +0000 (12:46 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 26 Sep 2007 10:46:59 +0000 (12:46 +0200)
2007-09-26  Robert Dewar  <dewar@adacore.com>

* s-wchstw.adb: provide messages for run time unit exceptions

* a-witeio.adb: Minor reformatting

* exp_ch13.adb: Minor reformatting

From-SVN: r128807

gcc/ada/a-witeio.adb
gcc/ada/exp_ch13.adb
gcc/ada/s-wchstw.adb

index c83230cdea7967129c22ea2b97bde69245c56911..f10f85007f393758d23b59788ab67f04a43aaee3 100644 (file)
@@ -1134,6 +1134,7 @@ package body Ada.Wide_Text_IO is
       --  Procedure to output one character of a wide character sequence
 
       procedure WC_Out is new Wide_Char_To_Char_Sequence (Out_Char);
+
       --------------
       -- Out_Char --
       --------------
index d10baa2928cfb18f86de3f800acb2d35848e85a8..9c39c1c4a836c3307a7ba75beaa392ee50d2d27a 100644 (file)
@@ -94,7 +94,6 @@ package body Exp_Ch13 is
             declare
                Decl : constant Node_Id := Declaration_Node (Ent);
                Typ  : constant Entity_Id := Etype (Ent);
-
             begin
                if Nkind (Decl) = N_Object_Declaration
                   and then Present (Expression (Decl))
index 476a2e84abecead6f791cde8de9813de5d9d4058..2f09ba25e615c96587bc9210d9af36df1fbd1b7c 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2007, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -74,7 +74,8 @@ package body System.WCh_StW is
       function In_Char return Character is
       begin
          if P > S'Last then
-            raise Constraint_Error;
+            raise Constraint_Error
+              with "badly formed wide character code";
          else
             P := P + 1;
             return S (P - 1);
@@ -136,7 +137,8 @@ package body System.WCh_StW is
          Get_Next_Code (S, SP, V, EM);
 
          if V > 16#FFFF# then
-            raise Constraint_Error;
+            raise Constraint_Error
+              with "out of range value for wide character";
          end if;
 
          RP := RP + 1;