-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.adb
More file actions
27 lines (21 loc) · 676 Bytes
/
Copy pathtest.adb
File metadata and controls
27 lines (21 loc) · 676 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
with Ada.Text_IO;
with Ada.Exceptions;
-- Test with all the tasking stuff in the closure too
with Ada.Real_Time;
pragma Unreferenced (Ada.Real_Time);
procedure Test is
procedure Raise_Ex with No_Inline is
begin
raise Constraint_Error with "Hello";
end Raise_Ex;
begin
Raise_Ex;
Ada.Text_IO.Put_Line ("Exception not caught!");
Ada.Text_IO.Put_Line ("===TEST COMPLETE===");
exception
when Ex : Constraint_Error =>
Ada.Text_IO.Put_Line ("Caught: " & Ada.Exceptions.Exception_Name (Ex));
Ada.Text_IO.Put_Line
("Message: " & Ada.Exceptions.Exception_Message (Ex));
Ada.Text_IO.Put_Line ("===TEST COMPLETE===");
end Test;