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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,71aa44b9692e8206 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-16 07:05:20 PST Path: archiver1.sj.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!212.43.194.69!fr.clara.net!heighliner.fr.clara.net!freenix!isdnet!psinet-france!psiuk-f4!psiuk-p4!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Package name Date: Wed, 16 May 2001 10:00:54 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9du16o$fr3$1@nh.pace.co.uk> References: <990017804.158478@edh3> NNTP-Posting-Host: 136.170.200.133 X-Trace: nh.pace.co.uk 990021656 16227 136.170.200.133 (16 May 2001 14:00:56 GMT) X-Complaints-To: newsmaster@pace.co.uk NNTP-Posting-Date: 16 May 2001 14:00:56 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.sj.google.com comp.lang.ada:7563 Date: 2001-05-16T14:00:56+00:00 List-Id: I think the idea is to have something like a pragma or attribute that lets you get the name of the module you are in as a string. I have frequently wished I could write a more general exception handler (or error handler or simple messages at runtime...) by having something like "Context'Image" or some other function that would provide the fully qualified name of the subprogram, package, whatever that I am currently in. Example: package body Some_Package is procedure Some_Procedure is .... Put_Line ("Running in: " & Current_Context'Image) ; having that print: Running in: Standard.Some_Package.Some_Procedure 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), but I think you'd want it to be available without an exception being raised. And of course, one could also want some sort of access to the dynamic context as well. (The call stack). There's no limit to the things I can want. But as my mother used to observe, "People in Hell want ice water, too!" :-) MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "Preben Randhol" wrote in message news:slrn9g509m.f4.randhol+abuse@kiuk0156.chembio.ntnu.no... > On Wed, 16 May 2001 14:56:38 +0200, Atle R�stad wrote: > > Is it possible to print out the package name? > > > > It would be a nice feature in tracing. Maybe even print the > > procedure/function name. > > What do you mean? > > -- > Preben Randhol ------------------- http://www.pvv.org/~randhol/ -- > �For me, Ada95 puts back the joy in programming.�