From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Exception_Occurence and language designers
Date: Mon, 4 Dec 2017 18:43:05 +0100
Date: 2017-12-04T18:43:05+01:00 [thread overview]
Message-ID: <p041f9$b8r$1@dont-email.me> (raw)
In-Reply-To: <cf032577-f65e-4ce9-b356-6f70f4c117e7@googlegroups.com>
Exceptions are subject to Ada's visibility rules. In Ada 83, you could have
with Text_IO;
procedure Foobar is
procedure Foo is
Bar : exception;
begin -- Foo
raise Bar;
end Foo;
begin -- Foobar
Foo;
exception -- Foobar
when others => -- Bar is not visible here
Text_IO.Put_Line (Item => "An exception occurred");
end Foobar;
Even though Bar is not visible outside Foo, it can still propagate out to Foobar
and be handled by an others handler. It was impossible from that handler to know
what has been handled.
Ada.Exceptions is a way to get around these limitations with minimum impact on
backwards compatibility.
--
Jeff Carter
"I would never want to belong to any club that
would have someone like me for a member."
Annie Hall
41
prev parent reply other threads:[~2017-12-04 17:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-04 11:17 Exception_Occurence and language designers Mehdi Saada
2017-12-04 12:32 ` Simon Wright
2017-12-04 14:00 ` Mehdi Saada
2017-12-04 14:31 ` Dmitry A. Kazakov
2017-12-04 20:27 ` G. B.
2017-12-04 20:55 ` Dmitry A. Kazakov
2017-12-05 0:16 ` G. B.
2017-12-05 8:35 ` Dmitry A. Kazakov
2017-12-05 20:05 ` G. B.
2017-12-05 20:48 ` Dmitry A. Kazakov
2017-12-04 17:43 ` Jeffrey R. Carter [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox