From: guerby@gnat.com (Laurent Guerby)
Subject: Re: question on exceptions
Date: 1996/11/03
Date: 1996-11-03T00:00:00+00:00 [thread overview]
Message-ID: <ws9iv7n2jtu.fsf@schonberg.cs.nyu.edu> (raw)
In-Reply-To: E090uD.Kx6@tip.nl
Michiel> Questions: Unlike an exception in C++, an Ada exception
Michiel> cannot carry any extra information besides it's own name. In
Michiel> C++ you can have an exception of a certain class
Michiel> e.g. SQL_Exception, and then put a message in an exception
Michiel> when it occurs. The exception handler can then use that
Michiel> information to write on a log-file or the like. It seems to
Michiel> me that this is a more flexible concept (exceptions as
Michiel> objects) than that of Ada (exceptions as scalar types). I
Michiel> hope you can convince me that I'm wrong! What do you think?
In Ada 95 an exception can carry a message (String), I believe this
functionality was added to help logging (an example of use you give).
Exceptions are not "scalar" types, look at Ada.Exceptions if you're
interested in Exception_Occurence objects.
If you need more information to pass with an exception, may be it's
better to add a few parameters to your interface.
--
Laurent Guerby <guerby@gnat.com>, Team Ada.
"Use the Source, Luke. The Source will be with you, always (GPL)."
next prev parent reply other threads:[~1996-11-03 0:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-11-02 0:00 question on exceptions Michiel Perdeck
1996-11-03 0:00 ` Laurent Guerby [this message]
1996-11-04 0:00 ` Do-While Jones
1996-11-06 0:00 ` Robert A Duff
1996-11-07 0:00 ` Tucker Taft
1996-11-08 0:00 ` Robert A Duff
1996-11-08 0:00 ` Robert Dewar
1996-11-09 0:00 ` Tucker Taft
[not found] ` <E0Mr58.D00@world.std.com>
1996-11-09 0:00 ` Robert Dewar
1996-11-03 0:00 ` Robert A Duff
1996-11-04 0:00 ` Michel Gauthier
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox