comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@bix.com
Subject: Re: Program identification
Date: 1996/08/31
Date: 1996-08-31T00:00:00+00:00	[thread overview]
Message-ID: <508oqs$4jv@news2.delphi.com> (raw)


>P'Identity which returns a string, P is a program unit
If I understand what you want, how about Ada.Command_Line.Command_Name

>P'Location which returns a string, P is a program unit and the string would
>contain the current line number in the source code, or maybe even the previous
>line number (for exception processing).
  Does Ada.Exceptions.Exception_Information do what you want?

with ada.exceptions;
with text_io;
procedure test is

  bang:exception;

  procedure badguy is
  begin raise bang; end badguy;

begin

  badguy;

exception
  when oops:bang =>
    text_io.put("egad:"
                & ada.exceptions.exception_information(oops)
                & ", whew");
end test;

  produces:

egad:TEST.BANG
   On Line Number 8 In TEST.BADGUY
Called from line number 12 In TEST
, whew




             reply	other threads:[~1996-08-31  0:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-31  0:00 tmoran [this message]
1996-08-31  0:00 ` Program identification Robert A Duff
  -- strict thread matches above, loose matches on Subject: below --
1996-09-02  0:00 tmoran
1996-09-03  0:00 ` Joel VanLaven
1996-08-29  0:00 Chris Sparks
1996-08-31  0:00 ` Dale Stanbrough
1996-08-31  0:00 ` Ray Blaak
1996-08-31  0:00 ` Robert A Duff
1996-08-31  0:00   ` Ray Blaak
1996-08-31  0:00     ` Robert A Duff
1996-09-02  0:00 ` Stephen & Tammy House
1996-09-03  0:00 ` David C. Hoos, Sr.
1996-09-13  0:00 ` James A. Krzyzanowski
1996-09-14  0:00   ` Ken Garlington
1996-09-15  0:00     ` Larry Kilgallen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox