source: ada-examples/exception_test/exception_test.adb

ada-examples-4-10-branch ada-examples-4-10-2
Last change on this file was 964021d, checked in by Joel Sherrill <joel.sherrill@…>, on 09/17/09 at 18:13:34

2009-09-17 Joel Sherrill <joel.sherrill@…>

  • Makefile, exception_test.adb: Make follow standard RTEMS test output format. Add output screens where appropriate.
  • exception_test.scn: New file.
  • Property mode set to 100644
File size: 502 bytes
Line 
1--
2-- $Id$
3--
4
5with Ada.Text_IO; use Ada.Text_IO;
6
7procedure ExceptionTest is
8begin
9   begin
10      Put_Line ("*** Exception Test 1 ***");
11      Put_Line ("Raising Constraint_Error");
12      raise Constraint_Error;
13      --  Do not get here
14   exception
15      when others =>
16         Put_Line ("Caught Constraint_Error -- inner");
17         Put_Line ("*** END OF Exception Test 1 ***");
18   end;
19exception
20   when others =>
21     Put_Line ("Caught Constraint_Error -- outer -- not OK");
22end ExceptionTest;
23
Note: See TracBrowser for help on using the repository browser.