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:26:56 PST Path: archiver1.sj.google.com!newsfeed.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!chcgil2-snh1.gtei.net!chcgil2-snf1.gtei.net!news.gtei.net!newspump.sol.net!homer.alpha.net!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <990017804.158478@edh3> <9du16o$fr3$1@nh.pace.co.uk> Subject: Re: Package name X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500 Message-ID: Date: Wed, 16 May 2001 13:24:03 -0500 NNTP-Posting-Host: 156.46.62.124 X-Complaints-To: abuse@alpha.net X-Trace: homer.alpha.net 990037615 156.46.62.124 (Wed, 16 May 2001 13:26:55 CDT) NNTP-Posting-Date: Wed, 16 May 2001 13:26:55 CDT Xref: archiver1.sj.google.com comp.lang.ada:7581 Date: 2001-05-16T13:24:03-05:00 List-Id: Marin David Condic wrote in message <9du16o$fr3$1@nh.pace.co.uk>... >It would be useful for diagnostics in the event of various errors or other >conditions. Maybe even have "Current_Context'Line_Number" and similar >capabilities? One would wish that Exception_Message and >Exception_Information had this sort of information in their returned strings >(Never seen it myself in the implementations I've used)... You've obviously never used Janus/Ada. It includes a complete traceback of the calls in Exception_Information: ** Unhandled CONSTRAINT_ERROR Index or Subtype out of bounds - Pos of Error Value = 12 On Line Number 7 In PROC.FOO.BAR Called from line number 123 In PROC.FOO Called from line number 11 In PROC (It always has had this, but there wasn't a clean way to get it in Ada 83 except to let the program terminate with an unhandled exception.) This is a godsend when debugging. (It also keeps limited information about reraised exceptions, so the original traceback isn't lost.) All of the Claw exception handlers display Exception_Information in order to be able to access this information. On some compilers, Exception_Information is pretty useless (and we try to debug Claw with other compilers, usually Janus/Ada and GNAT) unless the problem is compiler-specific. One problem with Claw is that many exceptions are raised by a subprogram Raise_Windows_Error (which sets up an appropriate Exception_Message), so you need the line number and package of the call to that routine in order to find out anything useful. Only Janus/Ada gives enough information to easily debug such exceptions. Randy Brukardt. Randy.