From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HELO_NO_DOMAIN,MAILING_LIST_MULTI,RDNS_NONE,REPLYTO_WITHOUT_TO_CC, SPOOFED_FREEMAIL_NO_RDNS autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e151cd4e58019c6c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-10 03:42:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!t-online.de!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: "Gautier Write-only-address" Newsgroups: comp.lang.ada Subject: Re: Newbie: Best Ada Compiler for MS Windows ? Date: Wed, 10 Apr 2002 10:41:50 +0000 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: avanie.enst.fr 1018435322 22565 137.194.161.2 (10 Apr 2002 10:42:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Wed, 10 Apr 2002 10:42:02 +0000 (UTC) Return-Path: X-Originating-IP: [194.40.39.20] X-OriginalArrivalTime: 10 Apr 2002 10:41:50.0338 (UTC) FILETIME=[523CFE20:01C1E07C] Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.8 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:22308 Date: 2002-04-10T10:41:50+00:00 >As to the impression made on the average newbie, we apparently differ. You are not alone - it's surprising since all components now are in GNAT, except the last inch towards the newbie. Below a solution allowing not to include GNAT-specific things in the source: a wrapper. Should be done by the binder... ____________________________________________________________ Gautier -- http://www.mysunrise.ch/users/gdm/index.htm#Ada NB: For a direct answer, address on the Web site! PS: ------------------------------------------------------------------------------ -- File: TB_Wrap.ads -- Description: Trace-back wrapper for GNAT 3.13p+ (spec.) ------------------------------------------------------------------------------ generic with procedure My_main_procedure; procedure TB_Wrap; ------------------------------------------------------------------------------ -- File: TB_Wrap.adb -- Description: Trace-back wrapper for GNAT 3.13p+ (body) ------------------------------------------------------------------------------ with GNAT.Traceback.Symbolic, Ada.Exceptions, Ada.Text_IO; use Ada.Exceptions, 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; with Test_Exc, TB_Wrap; procedure GNAT_Ex is new TB_Wrap( Test_Exc); procedure Test_Exc is procedure A is begin raise constraint_error; end; begin A; end; _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.