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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,71aa44b9692e8206 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-16 11:11:40 PST Path: archiver1.sj.google.com!newsfeed.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc1.sfba.home.com.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: RE: Package name References: X-Newsreader: Tom's custom newsreader Message-ID: Date: Wed, 16 May 2001 18:11:39 GMT NNTP-Posting-Host: 24.7.82.199 X-Complaints-To: abuse@home.net X-Trace: news1.rdc1.sfba.home.com 990036699 24.7.82.199 (Wed, 16 May 2001 11:11:39 PDT) NNTP-Posting-Date: Wed, 16 May 2001 11:11:39 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.sj.google.com comp.lang.ada:7578 Date: 2001-05-16T18:11:39+00:00 List-Id: >The Aonix ObjectAda compiler on Windows NT, returns the Package, >Procedure, and line number when Exception_Information is called. In Janus Ada: with Ada.Exceptions, Ada.Text_Io; procedure Show_Me is procedure Show(Msg : in String) is E : exception; begin raise E; exception when Debug : E => Ada.Text_Io.Put_Line(Msg & ":" & Ada.Exceptions.Exception_Information(Debug)); end Show; procedure Testp is begin Show("inside testp"); Show("still in testp"); end Testp; begin Show("main program"); Testp; end Show_Me; gives: main program:SHOW_ME.SHOW.E On Line Number 9 In SHOW_ME.SHOW Called from line number 23 In SHOW_ME inside testp:SHOW_ME.SHOW.E On Line Number 9 In SHOW_ME.SHOW Called from line number 18 In SHOW_ME.TESTP Called from line number 24 In SHOW_ME still in testp:SHOW_ME.SHOW.E On Line Number 9 In SHOW_ME.SHOW Called from line number 19 In SHOW_ME.TESTP Called from line number 24 In SHOW_ME Of course not all compilers are this helpful, so the PragmAda generic approach may be preferable.