From: tmoran@acm.org
Subject: RE: Package name
Date: Wed, 16 May 2001 18:11:39 GMT
Date: 2001-05-16T18:11:39+00:00 [thread overview]
Message-ID: <vpzM6.13160$%i7.12628568@news1.rdc1.sfba.home.com> (raw)
In-Reply-To: mailman.990029894.5812.comp.lang.ada@ada.eu.org
>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.
next prev parent reply other threads:[~2001-05-16 18:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-16 16:17 Package name Beard, Frank
2001-05-16 18:11 ` tmoran [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-05-16 12:56 Atle R�stad
2001-05-16 13:28 ` Preben Randhol
2001-05-16 13:46 ` Atle R�stad
2001-05-16 14:00 ` Marin David Condic
2001-05-16 16:45 ` Claude SIMON
2001-05-17 13:59 ` Marin David Condic
2001-05-17 15:06 ` Samuel T. Harris
2001-05-16 18:24 ` Randy Brukardt
2001-05-16 16:10 ` Jeffrey Carter
2001-05-16 17:08 ` David C. Hoos, Sr.
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox