summaryrefslogblamecommitdiffstats
path: root/exception_test3/exceptiontest3.adb
blob: 37110088215ac64a6b5720da763d8177bc334a55 (plain) (tree)
1
2
3
4
5
6
7
8
9



        




                                  
                                            












                                                       
                                                      







                                                             
--
--  $Id$
--

with Ada.Text_IO; use Ada.Text_IO;

procedure ExceptionTest3 is
   function F return Boolean is
   begin
      Put_Line ("*** Exception Test 3 ***");
      raise Constraint_Error;
      return True;
   end F;
begin
   begin
      if F then
         Put_Line ("Not ok");
      else
         Put_Line ("Not ok and bad value");
      end if;
   exception
      when Constraint_Error =>
         Put_Line ("Caught Constraint_Error -- inner");
         Put_Line ("*** END OF Exception Test 3 ***");
      when others =>
         Put_Line ("not ok wrong exception");
   end;
exception
   when others =>
     Put_Line ("Caught Constraint_Error -- outer -- not OK");
end ExceptionTest3;
--END exceptiontest3.adb