comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@world.std.com>
Subject: Re: ADA Exception Handling
Date: 1998/10/29
Date: 1998-10-29T00:00:00+00:00	[thread overview]
Message-ID: <wcc1znrhqu1.fsf@world.std.com> (raw)
In-Reply-To: 719anr$bko$1@usenet.rational.com

"Corey Ashford" <corey@remove.these.four.words.rational.com> writes:

> For example, in C++, an exception can be reraised from outside the exception
> handler (a.k.a catch block) - for example in a function which is
> called by the handler.  This
> isn't possible in Ada.

It is possible in Ada, using exception occurrences and the
Ada.Exceptions package.

I agree that for the most part, Ada and C++ exceptions are more-or-less
the same.

I'd say the biggest difference between Ada and C++ exceptions is that
C++ allows you to add information to an exception occurrence in a
type-safe way; that is, you declare that information at the point of the
exception *type*, and the raising and handling have to agree.  You can
add information in Ada, too, but it's not type-safe -- you must encode
the information as a String.  Sigh.

- Bob
-- 
Change robert to bob to get my real email address.  Sorry.




  reply	other threads:[~1998-10-29  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-28  0:00 ADA Exception Handling Stefan Papp
1998-10-29  0:00 ` Corey Ashford
1998-10-29  0:00   ` Robert A Duff [this message]
1998-10-29  0:00   ` Tucker Taft
1998-10-29  0:00     ` Corey Ashford
1998-10-29  0:00 ` Jerry van Dijk
replies disabled

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