bar_codes_2.0.0_d2aec096/gnat/tb_wrap.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
------------------------------------------------------------------------------
--  File:            TB_Wrap.adb
--  Description:     Trace-back wrapper for GNAT 3.13p+ (body)
------------------------------------------------------------------------------

with GNAT.Traceback.Symbolic, Ada.Exceptions, Ada.Text_IO;
use Ada.Text_IO;

procedure TB_Wrap is
  --  pragma Compiler_options("-g");
  --  pragma Binder_options("-E");
begin
  My_main_procedure;
exception
  when E : others =>
    New_Line;
    Put_Line ("--------------------[ Unhandled exception ]-----------------");
    Put_Line (" > Name of exception . . . . .: " &
             Ada.Exceptions.Exception_Name (E));
    Put_Line (" > Message for exception . . .: " &
             Ada.Exceptions.Exception_Message (E));
    Put_Line (" > Trace-back of call stack: ");
    Put_Line (GNAT.Traceback.Symbolic.Symbolic_Traceback (E));
end TB_Wrap;