garlic_6.0.1_90ef4b6f/Tests/Exceptions/exceptions_remote.adb

 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
28
29
30
31
32
33
34
35
36
--
--  exceptions_remote.adb,v 1.2 1996/04/10 15:42:51 tardieu Exp
--

with Ada.Exceptions; use Ada.Exceptions;

package body Exceptions_Remote is

   procedure Raise_No_Error is begin null; end Raise_No_Error;

   procedure Raise_Program_Error is
   begin
      Raise_Exception (Program_Error'Identity,
                       "This is the Program error message");
   end Raise_Program_Error;

   procedure Raise_Constraint_Error is
   begin
      Raise_Exception (Constraint_Error'Identity,
                       "This is the Constraint error message");
   end Raise_Constraint_Error;

   procedure Raise_User_Error is
   begin
      Raise_Exception (User_Error'Identity,
                       "This is the User error message");
   end Raise_User_Error;

   procedure Raise_Hidden_User_Error is
      Hidden_User_Error : exception;
   begin
      Raise_Exception (Hidden_User_Error'Identity,
                       "This is the Hidden error message");
   end Raise_Hidden_User_Error;

end Exceptions_Remote;