summaryrefslogtreecommitdiff
path: root/exception_test/exception_test.adb
blob: 1a6dcdf0f01eb273d37a304f4351b9fac8aaa450 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--
-- $Id$
--

with Ada.Text_IO; use Ada.Text_IO;

procedure ExceptionTest is
begin
   begin
      Put_Line ("*** Exception Test 1 ***");
      Put_Line ("Raising Constraint_Error");
      raise Constraint_Error;
      --  Do not get here
   exception
      when others =>
         Put_Line ("Caught Constraint_Error -- inner");
         Put_Line ("*** END OF Exception Test 1 ***");
   end;
exception
   when others =>
     Put_Line ("Caught Constraint_Error -- outer -- not OK");
end ExceptionTest;