------------------------------
function Exception_Info_Maxlength
- (X : Exception_Occurrence) return Natural is
+ (X : Exception_Occurrence) return Natural
+ is
begin
return
Basic_Exception_Info_Maxlength (X)
procedure Append_Info_Exception_Message
(X : Exception_Occurrence;
Info : in out String;
- Ptr : in out Natural) is
+ Ptr : in out Natural)
+ is
begin
if X.Id = Null_Id then
raise Constraint_Error;
end if;
declare
- Len : constant Natural := Exception_Message_Length (X);
+ Len : constant Natural := Exception_Message_Length (X);
Msg : constant String (1 .. Len) := X.Msg (1 .. Len);
begin
Append_Info_String (Msg, Info, Ptr);
end if;
declare
- Len : constant Natural := Exception_Name_Length (Id);
+ Len : constant Natural := Exception_Name_Length (Id);
Name : constant String (1 .. Len) := To_Ptr (Id.Full_Name) (1 .. Len);
begin
Append_Info_String (Name, Info, Ptr);
---------------------------
function Exception_Name_Length
- (Id : Exception_Id) return Natural is
+ (Id : Exception_Id) return Natural
+ is
begin
-- What is stored in the internal Name buffer includes a terminating
-- null character that we never care about.
------------------------------
function Exception_Message_Length
- (X : Exception_Occurrence) return Natural is
+ (X : Exception_Occurrence) return Natural
+ is
begin
return X.Msg_Length;
end Exception_Message_Length;
is
Info : aliased String (1 .. Basic_Exception_Tback_Maxlength (X));
Ptr : Natural := Info'First - 1;
-
begin
Append_Info_Basic_Exception_Traceback (X, Info, Ptr);
return Info (Info'First .. Ptr);
is
Info : String (1 .. Exception_Info_Maxlength (X));
Ptr : Natural := Info'First - 1;
-
begin
Append_Info_Exception_Information (X, Info, Ptr);
return Info (Info'First .. Ptr);
if Excep.Msg_Length <= Exception_Msg_Max_Length - Size then
Excep.Msg (Excep.Msg_Length + 1) := ':';
Excep.Msg_Length := Excep.Msg_Length + Size;
+
Val := Number;
Size := 0;
-
while Val > 0 loop
Remind := Val rem 10;
Val := Val / 10;
Len : constant Natural :=
Natural'Min (Message'Length, Exception_Msg_Max_Length);
First : constant Integer := Message'First;
- Excep : constant EOA := Get_Current_Excep.all;
-
+ Excep : constant EOA := Get_Current_Excep.all;
begin
Excep.Exception_Raised := False;
Excep.Msg_Length := Len;
Excep.Id := Id;
Excep.Num_Tracebacks := 0;
Excep.Pid := Local_Partition_ID;
-
end Set_Exception_Msg;
----------------------------------
-------------------------
function Find_Insertion_Node return Node_Id is
- Par : Node_Id := N;
+ Par : Node_Id;
begin
-- Climb up the branches of a complex if statement
+ Par := N;
while Nkind_In (Parent (Par), N_And_Then, N_Op_Not, N_Or_Else) loop
Par := Parent (Par);
end loop;
return Par;
end Find_Insertion_Node;
+ -- Local variables
+
Ins_Nod : constant Node_Id := Find_Insertion_Node;
Loc : constant Source_Ptr := Sloc (Decl);
Obj_Id : constant Entity_Id := Defining_Identifier (Decl);
Temp_Id : Node_Id;
begin
- -- Step 1: Create the access type which provides a reference to
- -- the transient object.
+ -- Step 1: Create the access type which provides a reference to the
+ -- transient object.
if Is_Access_Type (Obj_Typ) then
Desig_Typ := Directly_Designated_Type (Obj_Typ);
Ptr_Decl :=
Make_Full_Type_Declaration (Loc,
Defining_Identifier => Ptr_Id,
- Type_Definition =>
- Make_Access_To_Object_Definition (Loc,
- All_Present =>
- Ekind (Obj_Typ) = E_General_Access_Type,
- Subtype_Indication => New_Reference_To (Desig_Typ, Loc)));
+ Type_Definition =>
+ Make_Access_To_Object_Definition (Loc,
+ All_Present =>
+ Ekind (Obj_Typ) = E_General_Access_Type,
+ Subtype_Indication => New_Reference_To (Desig_Typ, Loc)));
Insert_Action (Ins_Nod, Ptr_Decl);
Analyze (Ptr_Decl);