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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,b2bad1e85ca20475 X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,5b3c19b1631bb558 X-Google-Attributes: gid103376,public From: "jacob navia" Subject: Re: The best thing/greatest feature summary Date: 2000/11/10 Message-ID: <8uhj19$q9j$1@wanadoo.fr>#1/1 X-Deja-AN: 692139367 References: <39DCB9E3.EAE8F426@ftw.rsc.raytheon.com> <39F9FCCE.D6719C6F@ftw.rsc.raytheon.com> <1c9kvs4uvj4ofd46f7a8vq0pju596iu2gr@4ax.com> <39fed7b6@rsl2.rslnet.net> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Complaints-To: abuse@wanadoo.fr X-Trace: wanadoo.fr 973885289 26931 193.251.181.115 (10 Nov 2000 19:41:29 GMT) Organization: Wanadoo, l'internet avec France Telecom X-MSMail-Priority: Normal NNTP-Posting-Date: 10 Nov 2000 19:41:29 GMT Newsgroups: comp.lang.eiffel,comp.lang.ada Date: 2000-11-10T19:41:29+00:00 List-Id: When you use lcc-win32 (a C compiler) with the -g4 option, any trap/error, etc will be displayed in the screen with: Trap in function foo foo.c line 243 called from baz baz.c line 45 called from yyy yyy.c line 77 etc There is a function _stacktrace() that allows you to show that when you want in your code > Here's a simple example where I'd find it useful: > > Quite often in user written Ada error handling packages, it is nice to be > able to increase the detail in the error message, and be able to print or > log the name of the routine or class in which it occured. A 'debug' mode so > to speak. > > In ada I've seen this done by declaring constant strings which match (at the > time of writing) the text to be displayed or logged. However there is > nothing to link the content of these strings to the items they refer, so > during the life of an application mismatches can occur. > > java.lang.reflect has getName, getDeclaringClass, to name but two. > > OK, at first sight, it won't be THE Best/Greatest feature of the language, > but small practical improvements do help to popularise a language. > > PS. Maybe there is an equivalent 'Name attribute for a routine, or > 'Parent_Class_Name attribute, which I've not been able to find. Please > advise! > > >